English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have developed user login page in my webpage. When I try to loging by FormsAuthentication.RedirectFromLoginPage(user,false). It automcatically redirect to Default.aspx. Following are my code.

if(Login()==true)
{
FormsAuthentication.RedirectFromLoginPage(txtUser.text,False)
}
else
{
message.text="Invalid Loign. try again..."
}

My secure page name is UserHome.aspx which is in forlder UserHome. I want that user with go their home page after successfull login.....

I inherits login technique from http://msdn.microsoft.com/msdnmag/issues/02/05/ASPSec2/


Its very urget Please help me.

2007-02-08 00:57:11 · 1 answers · asked by Jack J 1 in Computers & Internet Programming & Design

1 answers

What is your question?

The RedirectFromLoginPage method redirects to the URL specified in the query string using the ReturnURL variable name. For example, in the URL http://www.contoso.com/login.aspx?ReturnUrl=caller.aspx, the RedirectFromLoginPage method redirects tothe return URL caller.aspx. If the ReturnURL variable does not exist, the RedirectFromLoginPage method redirects to the URL in the DefaultUrl property.

ASP.NET automatically adds the return URL when the browser is redirected to the login page.

By default, the ReturnUrl variable must refer to a page within the current application. If ReturnUrl refers to a page in a different application or on a different server, the RedirectFromLoginPage methods redirects to the URL in the DefaultUrl property.If you want to allow redirects to a page outside the current application, you must set the EnableCrossAppRedirects property to true using the enableCrossAppRedirects attribute of the forms configuration element.

2007-02-08 02:10:43 · answer #1 · answered by Smutty 6 · 0 0

fedest.com, questions and answers