0

Using asp.net validators, I'd like a control similar to the validation summary, except that it should only have 2 states: Hidden or showing a static message. When the page is valid, it should be hidded, and when it's not it should be showing the message :)

Is this possible using the built-in controls of asp.net?

(Bear in mind, I want to utilize the client-side validation of my validators, and hence, this message must be running client-side)

[EDIT] Since no one seems to know about this type of control, I'd be happy if someone could tell me if it's possible to inject my own javascript into asp.net controls? So I can have some javascript fired onButtonClick, before the request is sent to the server?

1 Answer 1

1

If you don't want the asp validator controls to take up space when there are no error messages use

Display=Dynamic

property in your validator.

For your second question:

you could use

onClientClick="somjsfunc()"

property on your asp control

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.