PasswordRecovery.QuestionLabelText Proprietà

Definizione

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

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

Valore della proprietà

String

Etichetta per la casella di testo Question. L'impostazione predefinita è "Question".

Esempio

Nell'esempio di codice seguente viene impostata la QuestionLabelText proprietà .

<%@ 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 QuestionLabelText proprietà contiene il testo dell'etichetta per la casella di testo della domanda di conferma per il recupero della password.

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

Quando si utilizza la QuestionTemplate proprietà per definire l'aspetto della visualizzazione Domanda, la QuestionLabelText 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à, se impostato, può essere salvato automaticamente in un file di risorse usando uno strumento di progettazione. Per altre informazioni, vedere LocalizableAttribute Globalizzazione e localizzazione.

Si applica a

Vedi anche