views:

28

answers:

1

Hello All:

I am creating one web application in which I am showing watermark text for some fields.

For example: I have one text box "Name" in which I am showing "Fill Name" as watermark. I have one required field validator for this text box. So, I am clearing the text box before the required field validator chck the text box other wise it will treat "Fill Name" as valid data and it will not apply validations. But when the validations fails, the watermark is not coming. Can we register some kind of callback method on asp.net validators?

I just want to run one java script function when asp.net validations fails.

Thanks Ashwani

+1  A: 

Have a look at the TextboxWatermarkextender from the AjaxControlToolkit. That controls fulfills all your described wishes. Have a look at the InitialValue property.

citronas