Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CustomValidator question

Status
Not open for further replies.

flnMichael

Programmer
Joined
Nov 13, 2003
Messages
96
Location
US
Hey,
I have a custom validator function that only fires if there is something in the text field when I hit the submit button. Is there some order in which these validators need to be for them to run everytime I hit the submit button?

Thanks
Mike

Code:
private void ParamVal_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs e)
{
  try
   {
     string str = Convert.ToString(e.Value); 
     e.IsValid = (str != "") ? true : false; 
   }

  catch 
   { 
     e.IsValid = false; 
   }  
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top