RoboDev
RoboDev

Reputation: 4156

ASP.NET not parsing query strings

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.

Upvotes: 0

Views: 398

Answers (1)

Rubens Farias
Rubens Farias

Reputation: 57936

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

if(Request.Params["ReturnUrl"] != null)
{
    FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie);
}

Upvotes: 1

Related Questions