This documentation is archived and is not being maintained.

PassportIdentity.Name Property

Gets the name of the current user.

[Visual Basic]
Public Overridable ReadOnly Property Name As String  Implements _
   IIdentity.Name
[C#]
public virtual string Name {get;}
[C++]
public: __property virtual String* get_Name();
[JScript]
public function get Name() : String;

Property Value

The name of the current user, which is the Passport Unique Identifier (PUID).

Implements

IIdentity.Name

Remarks

For more information, see the Passport SDK documentation in the MSDN Library.

Example

[Visual Basic] 
' Declare new PassportIdendity object as variable newPass.
Dim newPass As System.Web.Security.PassportIdentity = New System.Web.Security.PassportIdentity()
' Set a string variable to the Passport member name from the cookie.
Dim sMemberName As String = newPass.Name

[C#] 
// Declare new PassportIdendity object as variable newPass.
System.Web.Security.PassportIdentity newPass = new System.Web.Security.PassportIdentity();
// Set a string variable to the Passport member name from the cookie.
string sMemberName = newPass.Name;

[C++] 
// Declare new PassportIdendity object as variable newPass.
PassportIdentity* newPass = new PassportIdentity();
// Set a string variable to the Passport member name from the cookie.
String* sMemberName = newPass->Name;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

PassportIdentity Class | PassportIdentity Members | System.Web.Security Namespace

Show: