How do I create the correct route values for this ActionLink?

后端 未结 5 1299
一整个雨季
一整个雨季 2021-02-18 21:48

The Model of SearchResults.aspx is an instance of PersonSearch; when the request for a new page arrive (a GET request), the action method should take i

5条回答
  •  梦谈多话
    2021-02-18 22:11

    It think it would be better to create another object with the correct values, instead of using (and potentially altering the current routevalues):

    <%=Html.ActionLink("Next Page >", "SearchResults", new {
        search = this.Model,
        page = 1 //or whatever
    }) %>
    

提交回复
热议问题