i am trying to update the form.While clicking on update button,i am getting the validation message as invalid email address.
i tried by adding validation expression as
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
but it dint worked.
emailids are: info@kmkya.kiev.ua and romexpo@romexpo.ro
code:
<td class="style10"><br/>Email ID <br/>
<asp:TextBox ID="txtemail" runat="server" Width="207"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" ValidationGroup="addval" runat="server" ErrorMessage="Invalid email address." ForeColor="Red"
ControlToValidate="txtemail" 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>
</td>
what is causing the problem?
Any help will be appreciated.
i am not having problem with other ids. right now only this ids is making the problem.
Download FREE API for Word, Excel and PDF in ASP.Net:
Download
pandeyism
on Dec 17, 2018 11:09 PM
on Dec 17, 2018 11:23 PM
1
Hey chetan,
Please refer below sample it's working.
HTML
<div>
<asp:TextBox ID="txtemail" runat="server" Width="207"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" ValidationGroup="addval"
runat="server" ErrorMessage="Invalid email address." ForeColor="Red" ControlToValidate="txtemail"
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>
<asp:Button Text="Update" runat="server" />
</div>
Screenshot
