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

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Opposite of RedirectFromLoginPage? Preset page to direct to...

    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(txtUserI D.Text,
    chkPersistLogin.Checked)
    Else
    ErrorMsg.InnerHtml = "Login Failed! Please try again."
    End If
    End Sub
    </script>

    Thanks
    Nugs (ASP.NET Newbie)


    Nugs Guest

  2. Similar Questions and Discussions

    1. Solution to Forms Authentication redirecting to bogus default.aspx page with RedirectFromLoginPage
      hi, i've read a lot of posts here about people who ran into problems using forms authentication, and the RedirectFromLoginPage() method, which...
    2. Dealing with direct acess of page, not passingstring
      the first one seems like the easiest method and worked like a charm. Thanks for your reply!
    3. Page Through Image with Direct Link
      Does anyone know of a cf tag that can do something similar to this page: http://www.alacasting.com/book6.asp Basically you choose a catalog and...
    4. direct to another page
      After submitting a form, I would like to redirect to another page. In ASP you can do : response.redirect "filename.asp", but what about PHP?
    5. how to preset the default font size for a web page?
      Hi, How can I set my default display font size, type for a web page, or a <table>? I dont want to write <font size=....> everywhere, especially...
  3. #2

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

    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,f alse);

    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(txtUserI D.Text,
    > chkPersistLogin.Checked)
    > Else
    > ErrorMsg.InnerHtml = "Login Failed! Please try again."
    > End If
    > End Sub
    > </script>
    >
    > Thanks
    > Nugs (ASP.NET Newbie)
    >
    >

    Marcio Kleemann Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139