PasswordRecovery.UserLookupError Olay
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Üyelik sağlayıcısı kullanıcı tarafından girilen kullanıcı adını bulamadıklarında gerçekleşir.
public:
event EventHandler ^ UserLookupError;
public event EventHandler UserLookupError;
member this.UserLookupError : EventHandler
Public Custom Event UserLookupError As EventHandler
Olay Türü
Örnekler
Aşağıdaki kod örneği olayı işler UserLookupError ve kullanıcı geçersiz bir kullanıcı adı girerse özelliği sıfırlar UserNameTitleText .
<%@ 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">
void PasswordRecovery1_UserLookupError(object sender, EventArgs e)
{
PasswordRecovery1.UserNameTitleText = "Try again";
PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red;
}
void PasswordRecovery1_AnswerLookupError(object sender, EventArgs e)
{
PasswordRecovery1.QuestionTitleText = "Try again";
PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red;
}
</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"
questiontitletext="Password Confirmation Question"
usernametitletext="Get a new password" OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
<titletextstyle
font-names="Arial"
font-bold="True"
forecolor="White"
backcolor="Gray">
</titletextstyle>
</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">
Sub PasswordRecovery1_UserLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
PasswordRecovery1.UserNameTitleText = "Try again"
PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red
End Sub
Sub PasswordRecovery1_AnswerLookupError(ByVal sender As Object, ByVal e As System.EventArgs)
PasswordRecovery1.QuestionTitleText = "Try again"
PasswordRecovery1.TitleTextStyle.ForeColor = System.Drawing.Color.Red
End Sub
</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"
questiontitletext="Password Confirmation Question"
usernametitletext="Get a new password" OnUserLookupError="PasswordRecovery1_UserLookupError" OnAnswerLookupError="PasswordRecovery1_AnswerLookupError">
<titletextstyle
font-names="Arial"
font-bold="True"
forecolor="White"
backcolor="Gray">
</titletextstyle>
</asp:passwordrecovery>
</form>
</body>
</html>
Açıklamalar
Olay UserLookupError , üyelik sağlayıcısı kullanıcı tarafından girilen kullanıcı adını bulamadıklarında oluşturulur.
Olayları işleme hakkında daha fazla bilgi için bkz. Olayları İşleme ve Oluşturma.
Şunlara uygulanır
Ayrıca bkz.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin