PasswordRecovery.UserNameLabelText Proprietà

Definizione

Ottiene o imposta il testo dell'etichetta per la casella di testo Nome utente.

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

Valore della proprietà

String

Etichetta per la casella di testo Nome utente. Il valore predefinito è " Nome utente".

Esempio

Nell'esempio di codice seguente la UserNameLabelText proprietà viene impostata su "Nome utente:".

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:PasswordRecovery id="PasswordRecovery1" runat="server" 
      AnswerLabelText="Your answer:" 
      QuestionLabelText="Answer this question:" 
      UserNameLabelText="Your user name:">
      <LabelStyle 
        font-bold="True" 
        forecolor="White"
        backcolor="Navy">
      </LabelStyle>
    </asp:PasswordRecovery>
  </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">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:PasswordRecovery id="PasswordRecovery1" runat="server" 
      UserNameLabelText="Your user name:" 
      QuestionLabelText="Answer this question:" 
      AnswerLabelText="Your answer:">
      <LabelStyle 
        font-bold="True" 
        forecolor="White"
        backcolor="Navy">
      </LabelStyle>
    </asp:PasswordRecovery>
  </form>
</body>
</html>

Commenti

La UserNameLabelText proprietà contiene il testo dell'etichetta per la UserName casella di testo.

Le impostazioni di stile nella LabelStyle proprietà definiscono l'aspetto UserNameLabelText della proprietà.

Quando si assegna un modello alla UserNameTemplate proprietà, la UserNameLabelText proprietà non ha alcun effetto.

Il testo predefinito per la proprietà viene localizzato in base all'impostazione delle impostazioni locali del server.

Il valore di questa proprietà, quando impostato, può essere salvato automaticamente in un file di risorse usando uno strumento di progettazione. Per altre informazioni, vedere LocalizableAttribute e Globalizzazione e Localizzazione.

Si applica a

Vedi anche