I have this url in my login view: http://localhost:5550/login?ReturnUrl=/forum/456&theme=1
I get the right url value when I am in the login page. As you can see I have 2 query string parameters: ReturnUrl and theme So far good.
Now the login page posts a form to a controller action. All I need is to read the values of these 2 query string params. I just can't make it work.
This is my login page view:
@using (Html.BeginForm("try", "login"))
{
//set text boxes and button so user can try login
}
This is my controller where I need those 2 values:
[HttpPost]
public ActionResult Try(LoginModel model, string ReturnUrl, string theme)
{
//read all query string param values...but how?
//I am not getting anything in string ReturnUrl, string theme. They are null
}
Other part of the question:
I can debug other controller. But not this controller. Is this because I am posting a form using BeginForm? Doesn't make sense. But the breakpoint never hits even though I get error on browser.