加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

mvc @Ajax.ActionLink 后台 写跳转

发布时间:2020-12-16 00:37:56 所属栏目:百科 来源:网络整理
导读:?? @Ajax.ActionLink 请求成功时,跳转到另外一个页面 return JavaScript("window.location = 'http://www.google.co.uk'"); // return Redirect(strUrl); 这种不行 请求失败时,弹出提示消息 return Json(new { msg = "跨系统登录失败!" }); 参考:http://s
??

@Ajax.ActionLink

请求成功时,跳转到另外一个页面

return JavaScript("window.location = 'http://www.google.co.uk'");
// return Redirect(strUrl); 这种不行


请求失败时,弹出提示消息

return Json(new { msg = "跨系统登录失败!" });

参考:http://stackoverflow.com/questions/1538523/how-to-get-an-asp-net-mvc-ajax-response-to-redirect-to-new-page-instead-of-inser

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读