Re: Opposite of RedirectFromLoginPage? Preset page to direct to...

From: Marcio Kleemann (notavailable)
Date: 05/27/04


Date: Wed, 26 May 2004 15:11:37 -0700

You can set the authentication cookie and then use response redirect, as
follows (sorry, this is C# but you should be able to easily translate):

FormsAuthentication.SetAuthCookie(txtUserID.Text,false);

Response.Redirect("PageYouWant.aspx",true);

"Nugs" <duncsjunk@comcast.net> wrote in message
news:H-ednQ7OLPFtfS7dRVn-gw@comcast.com...
> How can I set the page that the login page needs to send the user to. I
have
> a login page that does the RedirectFromLoginPage method, but I am now
> needing to explicitly tell the login page where to go instead of it
looking
> for the previously requested page. How would I do that?
>
> My code is as follows:
> <script language="vb" runat="server">
> Sub Login_Click(Src As Object, E As EventArgs)
> IF eon_login.Recordcount > 0 then
> FormsAuthentication.RedirectFromLoginPage(txtUserID.Text,
> chkPersistLogin.Checked)
> Else
> ErrorMsg.InnerHtml = "Login Failed! Please try again."
> End If
> End Sub
> </script>
>
> Thanks
> Nugs (ASP.NET Newbie)
>
>



Relevant Pages

  • Re: Open child form from dialog form
    ... found out that login failed in sub main? ... except I can't close login dialog. ... > Dim LoginForm As New LoginForm ... > I've set the button's dialogresult property in the designer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Secure Multiple Applications in one Domain
    ... Original Page, Login Page, Post of Login Page, Original Page, ... Is using the element in my root web's web.config file the way to ... > another sub application located in the ... Regarding on the repeatly be redirect to login page. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Simple Login programming: Authentication does not work for me!
    ... I thought it should be a simple matter to put a login page together after watching LearnVisualNet videos! ... The Login1.Authenticate sub may not be necessary. ... Protected Sub Login1_LoggedIn(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: web config problem!!!!
    ... I believe you could use the tag to get separate login pages for the admin and user sub folder.the location tag would go something like this: ... > folder has two sub folder named admin and user ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Secure Multiple Applications in one Domain
    ... root applicaiton 's root folder in IIS. ... Now you want the sub application's file also be ... use the same login page in the root web application. ... Regarding on the repeatly be redirect to login page. ...
    (microsoft.public.dotnet.framework.aspnet.security)