Enable Validation on Client and server

F

Fabrice

Hello,

For security reasons, i'd like to permit validation on client and server
side.
But if JavaScript is desactivate on the client, the validation have to take
place on server side for catch page.isvalid property.

How to do that ?

by this way :

<asp:RequiredFieldValidator
EnableClientScript="True" -> Client Side
runat="server" --> Server Side ?
EnableViewState="false"
/>

Thanks for your help.
 
S

S. Justin Gengo

Fabrice,

Yes, use the built in validators. They will validate client side if
possible. Then use If Page.IsValid serverside to make certain all input
passed validation before moving on.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top