Udostępnij przez


CreateUserWizard.EmailRegularExpressionErrorMessage Właściwość

Definicja

Pobiera lub ustawia komunikat o błędzie wyświetlany, gdy wprowadzony adres e-mail nie przekazuje kryteriów witryny dla adresów e-mail.

public:
 virtual property System::String ^ EmailRegularExpressionErrorMessage { System::String ^ get(); void set(System::String ^ value); };
public virtual string EmailRegularExpressionErrorMessage { get; set; }
member this.EmailRegularExpressionErrorMessage : string with get, set
Public Overridable Property EmailRegularExpressionErrorMessage As String

Wartość właściwości

Komunikat o błędzie wyświetlany, gdy wprowadzony adres e-mail nie przekazuje wyrażenia regularnego zdefiniowanego EmailRegularExpression we właściwości . Wartość domyślna to "Wprowadź inny adres e-mail". Domyślny tekst kontrolki jest zlokalizowany na podstawie bieżących ustawień regionalnych serwera.

Przykłady

Poniższy przykład kodu przypisuje komunikat o błędzie do EmailRegularExpressionErrorMessage właściwości , aby wskazać użytkownikom, że adres e-mail nie ma prawidłowego formatu.

<%@ page language="C#"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>CreateUserWizard.EmailRegularExpression sample</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:createuserwizard id="Createuserwizard1" runat="server" 
        emailregularexpression='@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"' 
        emailregularexpressionerrormessage="Email address must be in a valid format">
      </asp:createuserwizard>
    </div>
    </form>
</body>
</html>
<%@ page language="VB"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>CreateUserWizard.EmailRegularExpression sample</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:createuserwizard id="Createuserwizard1" runat="server" 
        emailregularexpression='@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"' 
        emailregularexpressionerrormessage="Email address must be in a valid format">
      </asp:createuserwizard>
    </div>
    </form>
</body>
</html>

Uwagi

EmailRegularExpressionErrorMessage Użyj właściwości , aby poinformować użytkownika, że wprowadzony adres e-mail nie przeszedł kryteriów witryny dla adresów e-mail.

Dotyczy

Zobacz też