询问者
aspnet mvc returnUrl 参数

问题
全部回复
-
可以展示你的代码么?
- 已标记为答案 Dun Eysa 2013年3月30日 13:03
- 取消答案标记 chenrensongModerator 2013年4月1日 0:19
-
在Controller上使用AuthorizeAttribute,在配置文件中,
<authentication mode="Forms"> <forms loginUrl="~/login" defaultUrl="~/" timeout="2880" /> </authentication>
原理:在AuthorizeAttribute中如果当前非验证用户,则调用FormsAuthentication.RedirectToLoginPage();转向登陆页面,该行代码会自动在url中添加?ReturnUrl=- 已建议为答案 DK. Da 2013年4月17日 5:21
-
Dun Eysa,
你不应该标记我为答案,请标记其他人的,谢谢。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats