ASP.NET MVC剃刀布局 - 网址是不会得到更新 [英] ASP.NET MVC Razor Layouts - the url is not getting updated
问题描述
我是pretty新的ASP.NET MVC所以如果和平我问一些愚蠢的事。问题是,当我从登录方法重定向它不会更新浏览器的URL正确
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");
}
虽然它呈现在菜单/索引视图内容,URL仍然
and although it renders the content from the Menu/Index view, the url remains
<一个href=\"http://localhost/App/account/logon#/WMSMobileWeb/account/logon\">http://localhost/App/account/logon#/WMSMobileWeb/account/logon
它应该是,
我使用的Razor视图引擎布局和JQuryMobile。任何想法?
I'm using Razor view engine with Layouts and with JQuryMobile. Any idea?
/黄蜂
推荐答案
看来,您呼叫使用Ajax这个动作,这就是为什么你的网址不会改变。
<一href=\"http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call\">This问题基本上涵盖了你需要做的Ajax方法重定向
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
这篇关于ASP.NET MVC剃刀布局 - 网址是不会得到更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!