FormsAuthenticationUser.Name Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Получает или задает имя пользователя при входе в систему.
public:
property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.LowerCaseStringConverter))]
[System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator]
public string Name { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Web.Configuration.LowerCaseStringConverter))>]
[<System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator>]
member this.Name : string with get, set
Public Property Name As String
Значение свойства
Имя пользователя при входе в систему, требующееся приложению.
- Атрибуты
Примеры
В следующем примере кода показано, как использовать свойство Name. Сведения о том, как получить этот раздел, см. в примере кода в FormsAuthenticationUser разделе класса.
// Using the Name property.
// Get current name.
string currentName =
formsAuthenticationUsers[0].Name;
// Set a new name.
formsAuthenticationUsers[0].Name = "userName";
' Using the Name property.
' Get current name.
Dim currentName As String = _
formsAuthenticationUsers(0).Name
' Set a new name.
formsAuthenticationUsers(0).Name = "userName"
Применяется к
GitHub сайтында бізбен бірлесіп жұмыс істеу
Бұл мазмұнның көзін GitHub сайтында табуға болады. Онда сонымен бірге мәселелер мен өзгертулерді енгізу сұрауларын жасауға және қарап шығуға болады. Қосымша ақпарат алу үшін қатысушы нұсқаулығын қараңыз.