You need to tie a regular expressionv alidator to a requried field validator
in your form. The validation expression below is a bit simple so you might
choose to find a better regexp, but the code should function to get you
running. I've not tried this code mind you....
<asp:textbox id="textbox1" runat="server"/>
<asp:RegularExpressionValidator id="valRegEx" runat="server"
ControlToValidate="textbox1"
ValidationExpression=".*@.*\..*"
ErrorMessage="* Your entry is not a valid e-mail address."
display="dynamic">*</asp:RegularExpressionValidator>You might also want
to try this as the validation
expression.ValidationExpression=".*@myDomain.com"
-- Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:AE**********************************@microsof t.com...
Hello,
I need to validate e-mail, so I need to see if textbox matches
*@myDomain.com, how can I do this?
Thanks,
Jim.