This documentation is archived and is not being maintained.

PassportIdentity.GetDomainFromMemberName Method

Returns the Passport domain from the member name string.

[Visual Basic]
Public Function GetDomainFromMemberName( _
   ByVal strMemberName As String _
) As String
[C#]
public string GetDomainFromMemberName(
 string strMemberName
);
[C++]
public: String* GetDomainFromMemberName(
 String* strMemberName
);
[JScript]
public function GetDomainFromMemberName(
   strMemberName : String
) : String;

Parameters

strMemberName
The name of the Passport member

Return Value

The Passport domain for the specified member.

Remarks

For more information, see the Passport SDK documentation in the MSDN Library at http://msdn.microsoft.com/library .

Example

[Visual Basic] 
' Declare new PassportIdendity object as variable newPass.
Dim newPass As System.Web.Security.PassportIdentity = New System.Web.Security.PassportIdentity()
' Get the URL for the Passport Information page using the 
' GetDomainAttribute(attributeName, LocaleID, Domain) method.
' LocaleID 1033 = English-USA
' Create a string with the name of the Passport domain associated with the current UserName.
Dim sPassportDomain As String = newPass.GetDomainFromMemberName(newPass.Name)
Dim sInfoURL As String = newPass.GetDomainAttribute("PassportInformationCenter", 1033, sPassportDomain)

[C#] 
// Declare new PassportIdendity object as variable newPass.
System.Web.Security.PassportIdentity newPass = new System.Web.Security.PassportIdentity();
// Get the name of the Passport domain associated with the current UserName.
string passportDomain = newPass.GetDomainFromMemberName(newPass.Name);

[C++] 
// Declare new PassportIdendity object as variable newPass.
PassportIdentity* newPass = new PassportIdentity();
// Get the name of the Passport domain associated with the current UserName.
String* passportDomain = newPass->GetDomainFromMemberName(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: