0

i knwo that validation controls actually validates asp:net contols but the thing that confuses me is that "Wheter it validates at server side or client side " ? i heard that it validates at client side so what does it have an attribute "Runat=server" ?

plz elaborate

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by HunainHafeez
0

The validation occurs client side. However, the code that is built to do this client side is generated server side, if that makes sense....

Very similiar to when you create an asp.net control say the gridview. If you look at the source code in the browser when you access a web page that had a gridview in it (by right clicking hte page, view source...), you'll notice that there isnt a gridview object anywhere in the HTML. The asp.net web server takes the gridview control and converts it in to an HTML table element. Same thing with the validation control. It creates javascript client side code.

0

ok lets get it straight now,
if i have imposed validation control say "Required field" validator on text box,and entered something invalid and clicked submit button, then first whole page will be submitted to server and then validation will be performed and then i vl be notified with error message ? is that so ?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.