Forms Authentication Redirect URL

Discussion in 'ASP .Net' started by Guest, Oct 15, 2005.

  1. Guest

    Guest Guest

    I want to be able to programmatically log a user in as a guest and redirect
    them to a different page.

    Is there any way to do a RedirectFromLoginPage() and explicity specify the
    page to which the user will be redirected after the login?

    -- p
     
    Guest, Oct 15, 2005
    #1
    1. Advertisements

  2. Guest

    Karl Seguin Guest

    RedirectFromLoginPage internally makes use of SetAuthCookie and a
    Response.Redirect. You can simply make use of those two functions if you
    need more granular control.

    FormsAuthentication.SetAuthCookie(value, false);
    Response.Redirect("whatever.aspx");

    Karl
     
    Karl Seguin, Oct 15, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Yes - That seems to do the trick.

    Thanks!

     
    Guest, Oct 15, 2005
    #3
  4. Guest

    indrajeet

    Joined:
    Mar 30, 2012
    Messages:
    1
    Likes Received:
    0

    Thanks. It is working fine for me. It is helpful for me.
     
    indrajeet, Mar 30, 2012
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.