(This is a more narrow question)
In my asp.net MVC action, I am looking if the ReturnUrl value is in the URL.
My Url looks like this:
http://localhost:56112/user/login?ReturnUrl=/user/settings
In my action, I am looking if that querystring value exists, and it is returning NULL?? How can this be?
The code:
if(Request.QueryString["ReturnUrl"] != null)
{
}
Tracing through the application, it is just skipping the if statement's body i.e. it is NULL.
How can this be explained?
Update
In the controller that checks if the user has logged in, I have a ActionFilter that looks like:
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
base.OnActionExecuting(filterContext);
// some stuff
string loginUrl = FormsAuthentication.LoginUrl + "/user/settings;
context.Response.Redirect(loginUrl);
}