views:

278

answers:

1

Hi all..

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  A: 

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

krishna
Thanks a lot :)
cwap