开发者

ASP.NET not parsing query strings

开发者 https://www.devze.com 2022-12-09 00:20 出处:网络
I\'m working on a web application and instead开发者_开发知识库 of using Membership I use the FormsAuthentication directly.

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.


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

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

精彩评论

暂无评论...
验证码 换一张
取 消