views:

146

answers:

1

I'm working on a web application and instead of using Membership I use the FormsAuthentication directly.

The problem is when I do a Form post I'm able to get all of the fields but it is not parsing the query strings.

When I look in the debugger the query string is there in the URI but not in the QueryString array.

I'm trying to get the ReturnUrl from the query string so I can make the login page go to the correct spot.

+1  A: 

You don't need to parse that QueryString; try just call in your login page:

if(Request.Params["ReturnUrl"] != null)
{
    FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie);
}
Rubens Farias
Spot on, what this guy said
Chris
The problem I'm having is the Query string is not showing up in the QueryString[] so the Request.Params["ReturnUrl"] will not work for me.
Superdumbell
cant you just call FormsAuthentication.RedirectFromLoginPage?
Rubens Farias