Поделиться через


Manager.GetDomainAttribute

Manager.GetDomainAttribute

The GetDomainAttribute method provides information for a particular Microsoft .NET Passport domain by querying the Passport Manager for the requested domain attribute.

Syntax

Function Manager.GetDomainAttribute(attributeName, [lcid] ,[domain]) As String

Parameters

  • attributeName
    String representing the name of the attribute value to retrieve.
  • lcid
    Optional integer representing the language preference of the .NET Passport user.
  • domain
    Optional string representing the .NET Passport domain name (such as "hotmail.com" or "msn.com") to query for an attribute. For more information about domains, see .NET Passport Environments.

Return values

The GetDomainAttribute method returns a string representing the requested attribute, typically a URL. If the requested attribute does not exist, an empty string is returned.

Example

The following Microsoft Visual Basic Scripting Edition (VBScript) code snippet calls GetDomainAttribute to make a link to the Edit Profile page.

...
'Create a Passport Manager Object
Dim oMgr
Set oMgr = Server.CreateObject("Passport.Manager")
Response.Write("<A HREF='")
Response.Write (oMgr.GetDomainAttribute("EDITPROFILE"))
Response.Write("'>Edit profile</A>) 
...

Remarks

The GetDomainAttribute method returns information about a user's domain defined in the Partner.xml file.

If the optional lcid parameter is omitted, the default specified in the registry is used. Use the Passport Manager Administration utility to set the default lcid.

If the optional domain parameter is omitted, and a user is signed in, the correct domain for that user is internally derived from the user's MemberName attribute. If the domain parameter is omitted, and a user is not signed in, domain defaults to "Default", a domain specified in the Component Configuration Document (CCD).

See Also

Passport Manager Object