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

Recommended Answers

All 3 Replies

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.

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 ?

and where does page.isValid etc stands ? mean what it do ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.