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

2019-04-23 09:21发布

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

1条回答
我想做一个坏孩纸
2楼-- · 2019-04-23 09:43

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

查看更多
登录 后发表回答