我刚开始使用asp.net mvc ..因为我不熟悉它,我只想问一个关于actionlink html helper的问题..
我的 index.aspx 主页视图中有此代码..
<% Dim _news As datatable = ViewData.Model%>
<% For count As Integer = 0 To _news.Rows.Count - 1%>
<% Dim id As Integer = _news.Rows(count).Item("IDnews")%>
<%=_news.Rows(count).Item("newsTitle")%>
<p>
<%=_news.Rows(count).Item("newsContent")%><br />
<%=Html.ActionLink("Read More..", "NewsPublic", "Administration", New With {id})%>
</p>
<%Next%>
如果我单击操作链接,我希望它会将我呈现到这个网址:/Administration/NewsPublic/7 但它给了我这个网址:/Home/NewsPublic?Length=14
actionlink 是否仅在同一个控制器中传递 id?
先感谢您!