ASP.NET MVC Razor Layouts - URL Not Updated

I am new to ASP.NET MVC, so if I ask for something stupid. The problem is that when I redirect from the LogOn method, it does not update the URL in the browser properly

public ActionResult LogOn(LogOnModel model, string returnUrl) { return RedirectToAction("Index", "Menu"); } 

and although it displays content in the Menu / Index view, the url remains

http: // localhost / App / account / logon # / WMSMobileWeb / account / logon

where was he supposed to be

http: // localhost / App / Menu / Index

I use the Razor view engine with layouts and with JQueryMobile. Any ideas?

/ Bumble bee

+8
jquery-mobile asp.net-mvc razor
source share
1 answer

It seems you are invoking this action using Ajax, so your url is not changing. This question mainly covers what you need to do to redirect using the Ajax approach

+5
source share

All Articles