How could I make a validation check when the user leaves a textbox?
Printable View
How could I make a validation check when the user leaves a textbox?
Code:private void Page_Load(object sender, System.EventArgs e)
{
string jsFunction = "";
jsFunction += "<script>";
jsFunction += " function Validate() ";
jsFunction += " {";
jsFunction += " alert('Lost Focus');";
jsFunction += " }";
jsFunction += "</script>";
Response.Write(jsFunction);
TextBox1.Attributes.Add("onBlur","javascript:Validate();");
}
thanks so much!