CreateUserWizard.UserName Özellik
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.
Kullanıcı tarafından girilen kullanıcı adını alır veya ayarlar.
public:
virtual property System::String ^ UserName { System::String ^ get(); void set(System::String ^ value); };
public virtual string UserName { get; set; }
member this.UserName : string with get, set
Public Overridable Property UserName As String
Özellik Değeri
Kullanıcı tarafından girilen kullanıcı adı. Varsayılan değer boş bir dizedir ("").
Örnekler
Aşağıdaki kod örneği, özelliğini olaydaki UserName tüm küçük harf alfabetik karakterlere CreatingUser ayarlar.
<%@ 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 Createuserwizard1_LoggingIn(object sender, EventArgs e)
{
// Make user the UserName field is lower case before logging in.
Createuserwizard1.UserName.ToLower();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>CreateUserWizard.LogginIn sample</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:createuserwizard id="Createuserwizard1" runat="server"
OnCreatingUser="Createuserwizard1_LoggingIn">
</asp:createuserwizard>
</div>
</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 Createuserwizard1_LoggingIn(ByVal sender As Object, ByVal e As LoginCancelEventArgs)
' Make sure the UserName field is lower case before logging in.
Createuserwizard1.UserName.ToLower()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>CreateUserWizard.LogginIn sample</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:createuserwizard id="Createuserwizard1" runat="server"
OnCreatingUser="Createuserwizard1_LoggingIn">
</asp:createuserwizard>
</div>
</form>
</body>
</html>
Açıklamalar
Özellikte MembershipProvider belirtilen üyelik sağlayıcısı için bir kullanıcı adı gerekiyorsa, denetimde CreateUserWizard kullanıcı adı metin kutusu görüntülenir. Denetimde CreateUserWizard görüntülenen her metin kutusunun kendisiyle ilişkilendirilmiş bir RequiredFieldValidator nesnesi vardır.