我可以得到当前的动作和控制器的名称等: 字符串MyReferrer =请求:获得前一个动作和控制器的名称在MVC控制器
string controllername = this.ValueProvider.GetValue("controller").RawValue.ToString();
string actionname = this.ValueProvider.GetValue("action").RawValue.ToString();
我也可以像得到reffer网址。 UrlReferrer.ToString();
但是,如何获取mvc2控制器中以前的动作和控制器的名称?
不确定是否对您有影响,但推荐人可以伪造。考虑这是否是一个安全问题。 –
这可能适合你:http://stackoverflow.com/questions/8830052/how-do-i-get-the-controller-and-action-names-from-the-referrer-uri – TestSubject