PasswordRecovery.UserNameInstructionText Eigenschap
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee haalt u de tekst op die moet worden weergegeven in de weergave UserName van het PasswordRecovery besturingselement om de gebruiker te laten instrueren een gebruikersnaam in te voeren.
public:
virtual property System::String ^ UserNameInstructionText { System::String ^ get(); void set(System::String ^ value); };
public virtual string UserNameInstructionText { get; set; }
member this.UserNameInstructionText : string with get, set
Public Overridable Property UserNameInstructionText As String
Waarde van eigenschap
De instructietekst die moet worden weergegeven in de weergave UserName. De standaardwaarde is 'Voer uw gebruikersnaam in om uw wachtwoord te ontvangen'.
Voorbeelden
In het volgende codevoorbeeld wordt de UserNameInstructionText eigenschap ingesteld op 'Voer de gebruikersnaam van uw website in'.
<%@ 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">
// <Snippet2>
void PasswordRecovery1_UserLookupError(object sender, EventArgs e)
{
PasswordRecovery1.UserNameInstructionText = "Enter the correct Web site user name.";
PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;
}
// </Snippet2>
// <Snippet4>
void PasswordRecovery1_AnswerLookupError(object sender, EventArgs e)
{
PasswordRecovery1.QuestionInstructionText = "Enter the correct answer to this question.";
PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red;
}
// </Snippet4>
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:passwordrecovery id="PasswordRecovery1" runat="server"
questioninstructiontext="Enter the answer to the password confirmation question."
usernameinstructiontext="Enter your Web site user name."
OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
<instructiontextstyle
font-size="Smaller"
font-names="Comic Sans MS"
font-italic="True"
forecolor="Blue">
</instructiontextstyle>
</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">
<script runat="server">
' <Snippet2>
Sub PasswordRecovery1_UserLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
PasswordRecovery1.UserNameInstructionText = "Enter the correct Web site user name."
PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red
End Sub
' </Snippet2>
' <Snippet4>
Sub PasswordRecovery1_AnswerLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
PasswordRecovery1.QuestionInstructionText = "Enter the correct answer to this question."
PasswordRecovery1.InstructionTextStyle.ForeColor = System.Drawing.Color.Red
End Sub
' </Snippet4>
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:passwordrecovery id="PasswordRecovery1" runat="server"
questioninstructiontext="Enter the answer to the password confirmation question."
usernameinstructiontext="Enter your Web site user name."
OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
<instructiontextstyle
font-size="Smaller"
font-names="Comic Sans MS"
font-italic="True"
forecolor="Blue">
</instructiontextstyle>
</asp:passwordrecovery>
</form>
</body>
</html>
Opmerkingen
De UserNameInstructionText eigenschap wordt weergegeven in de weergave UserName om de gebruiker uit te leggen hoe het PasswordRecovery besturingselement moet worden gebruikt.
De stijlinstellingen in de InstructionTextStyle eigenschap definiƫren het uiterlijk van de tekst in de UserNameInstructionText eigenschap.
Wanneer u een sjabloon gebruikt die aan de UserNameTemplate eigenschap is toegewezen, wordt de UserNameInstructionText eigenschap niet weergegeven.
De standaardtekst voor de eigenschap wordt gelokaliseerd op basis van de landinstelling van de server.
De waarde van deze eigenschap, wanneer deze is ingesteld, kan automatisch worden opgeslagen in een resourcebestand met behulp van een ontwerpprogramma. Zie en LocalizableAttribute voor meer informatie.