PasswordRecovery.AnswerLabelText Vlastnost

Definice

Získá nebo nastaví text popisku textového pole pro potvrzení hesla.

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

Hodnota vlastnosti

String

Popisek textového pole pro potvrzení hesla Výchozí hodnota je "Answer:" (Odpověď):"

Příklady

Následující příklad kódu nastaví AnswerLabelText vlastnost na řetězec "Vaše odpověď:".

<%@ 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>

Poznámky

Vlastnost AnswerLabelText obsahuje text popisku textového pole pro potvrzení obnovení hesla.

Nastavení stylu ve LabelStyle vlastnosti definuje vzhled textu zadaného AnswerLabelText ve vlastnosti.

Pokud přiřadíte šablonu ve QuestionTemplate vlastnosti, AnswerLabelText vlastnost nemá žádný vliv.

Výchozí text vlastnosti je lokalizován na základě nastavení národního prostředí serveru.

Hodnotu této vlastnosti lze při nastavení automaticky uložit do souboru prostředků pomocí nástroje návrháře. Další informace najdete v tématech LocalizableAttribute o globalizaci a lokalizaci.

Platí pro

Viz také