我想有一种观点,即与用户从这一角度浏览的哪一页的长度挂钩。
Let s say I have a View and relative Action named InfoPage, and on this page I want a link that simply says Return .
如果用户在AlpA和Navigates到InfoPage上,就把“回归”连接到A页。
如果用户在网页B上,并向InfoPage报到,则点击“回归”链把用户归到网页B。
我认为,这样做最容易的手段是,将回归城市作为InfoPage所用模式的财产。
我的问题是,我是如何获得这种回报的。
public ViewResult InfoPage(){
var model = new InfoPageModel();
//Set my model s other properties here...
model.ReturnUrl = //Where do I get this?
return view(model);
}
And then in my view
<a href="@Model.ReturnUrl">Return</a>