To start page

Serverside custom validator

Instead of hacking Javascript based client scripts for input validation you might consider server side custom validation. Stick to C# and be happier.
<asp:CustomValidator ID="valTemplate" ControlToValidate ="epiTemplate" 
OnServerValidate="ServerValidate" display="Dynamic" runat="server" />

protected void ServerValidate(object source, ServerValidateEventArgs args)
{
    args.IsValid = false;
    valTemplate.ErrorMessage = "This is bad!";
}
Comment this page
(No of comments: 0)

All rights reserved © 2007 epiforum.net | All trademarks and registered trademarks appearing on epiforum.net are the property of their respective owners. Every effort is made to provide accurate & complete information. However we cannot guarantee that there will be no errors and we do not make any warranty, expressed or implied, including the warranties of merchantability and fitness for a particular purpose with respect to documents available from epiforum.net. Additionally, epiforum.net assume no legal liability for the accuracy, completeness, or usefulness of any information, product, or process disclosed herein and do not represent that use of such information, product, or process would not infringe on privately owned rights. epiforum.net a brainchild of INEXOR AB.