Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC Razor Layouts - the url is not getting updated

I'm pretty new to ASP.NET MVC so peace if I'm asking something stupid. The problem is, when I'm redirecting 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 renders the content from the Menu/Index view, the url remains

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

where it should have been,

http://localhost/App/Menu/Index

I'm using Razor view engine with Layouts and with JQuryMobile. Any idea?

/Bumble Bee

like image 366
Illuminati Avatar asked Feb 22 '11 13:02

Illuminati


1 Answers

It seems, that you are calling this action using Ajax, that's why your URL doesn't change. This question basically covers what you need to do redirects with Ajax approach

like image 172
ionoy Avatar answered Oct 18 '22 10:10

ionoy