cshtml界面:
(当前页面在iframe框架中跳转出去我们需要调用window.parent.location="";)
(如果是普通页面之间跳转可以直接window.location.href="";)
跳转到action中可以Session.Clear();清除session
下面还有两种方式 可传参可不传参
$("#languageTest").click(function () {
window.location.href = '@Url.Action("GetLanguageTestList", "UserOrgManager")';
});
如果页面之间跳转,无参数(有的需要):window.location.href='@Url.Action("方法名","controller名")';。
如果跳到方法,带参数(有的不需要):window.location.href='@Url.Action("方法名","controller名")?id='+id;
补充:
window.location.href='@URL.Action("方法名","controller名")'和
window.location.href='/AdminManager/GetUserInfo'的效果是一样的。