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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email verification query

Status
Not open for further replies.

Everton1Blue

Technical User
Jun 6, 2014
41
GB
Hello

Can I ask please about email verification in my ASP.NET (VB.NET) project.

I have a form with this in my contact form:

Code:
<p><asp:Label ID="Email" runat="server" Text="Email"></asp:Label>
<asp:TextBox ID="your_email" runat="server"></asp:TextBox></p><br />
<asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="your_email" ForeColor="#FF6666"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexpEmail" runat="server" ErrorMessage="Please complete the Email field"
ValidationGroup="vgSubmit" ControlToValidate="your_email"></asp:RegularExpressionValidator>

<ValidationExpression="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@
 (?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"</asp:ValidationExpression>

I am getting two green underlines under <ValidationExpression and </asp:ValidationExpression>

It says ValidationExpression is missing the > from the start tag and </asp:ValidationExpression> has no matching start tag.

Thanks for any help.
 
<asp:ValidationExpression="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"></asp:ValidationExpression>
 
Hello Bovrik

Thank you.

It seems to be allowing this (I did this before your reply): does it look OK to you? I haven't precompiled it yet (I spent hours on it yesterday and do you know when you reach a certain limit, hehehehe).

Code:
<asp:Label ID="Email" runat="server" Text="Email"></asp:Label>
<asp:TextBox ID="your_email" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="your_email" ValidationGroup="vgSubmit" ForeColor="#FF6666"></asp:RequiredFieldValidator> 
              
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic" ErrorMessage="Please complete the Email field" ValidationGroup="vgSubmit" ControlToValidate="your_email"
ValidationExpression="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@ (?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"></asp:RegularExpressionValidator>

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top