Wie erstellt man eine Validation in Asp.net, welche Emails validiert?
Hier die Lösung:
<asp:TextBox ID="txtEmail" runat="server" /> <asp:RequiredFieldValidator ID="req4" runat="server" ControlToValidate="txtEmail" Text="*" /><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="eg. you@domain.com" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
Schlagworte: Asp, Email, net, Validation