asp.net.ph

FormsAuthentication.GetRedirectUrl Method

System.Web.Security Namespace   FormsAuthentication Class


Returns the redirect URL for the original request that caused the redirect to the logon page.

[ VB ]
Public Shared Function GetRedirectUrl ( _
   userName As String, _
   createPersistentCookie As Boolean _
 ) As String

[ C# ]
public static string GetRedirectUrl (
   string userName,
   bool createPersistentCookie
);

[ C++ ]
public: static String* GetRedirectUrl (
   String* userName,
   bool createPersistentCookie
);

[ JScript ]
public static function GetRedirectUrl (
   userName : String,
   createPersistentCookie : Boolean
 ) : String;

Parameters

userName
Name of the authenticated user. This does not have to map to a Windows account.
createPersistentCookie
Specifies whether or not a durable cookie ( a cookie that is saved across browser sessions ) should be issued. Cookie path defaults to'/'.

Return Value

A string containing the redirect URL.

Remarks

If there is no original URL, Default.aspx is used. If the redirect URL specifies a different server, this method also returns the authentication ticket as part of the query string. This method can be used by applications that need to do the redirect themselves instead of using RedirectFromLoginPage.

See Also

FormsAuthentication Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph