PasswordRecovery.QuestionLabelText Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the text of the label for the Question text box.
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
Property Value
The label for the Question text box. The default is "Question:"
Examples
The following code example sets the QuestionLabelText property.
<%@ 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>
Remarks
The QuestionLabelText property contains the label text for the password recovery confirmation question text box.
The style settings contained in the LabelStyle property define the appearance of the QuestionLabelText property.
When you use the QuestionTemplate property to define the appearance of the Question view, the QuestionLabelText property has no effect.
The default text for the property is localized based on the server's locale setting.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and Globalization and Localization.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應