<asp:TextBox ID="FirstEstimatorEmail" CssClass="textbox_style" Width="150px" runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator11" runat="server"
ControlToValidate="FirstEstimatorEmail" ErrorMessage="Invalid email address.
Please enter a valid email address." ValidationGroup="buttongroup"
onservervalidate="CustomValidatorEst1Email_ServerValidate"
ValidateEmptyText="True">  *</asp:CustomValidator>
in code behind page -
protected void CustomValidatorEst1Email_ServerValidate(object source, ServerValidateEventArgs args)
{
if (FirstEstimatorEmail.Text.Length < 1) { //do nothing }
else
{
Regex EmailRegex = new Regex(@"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)
*@((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$");
if (EmailRegex.IsMatch(FirstEstimatorEmail.Text.Trim()))
{
//email ok
}
else
args.IsValid = false;
}
}
regards..