Calling method from view in mvc
- by Alice in wonderland
I'm implementing paging on an mvc view, and I want to call a method in the controller from the view
view:
  >a href=">%= Url.Action("Search", new
  { page =
  NextPage(Request["exactPage"])).ToString()})
  %"
controller:
  public string NextPage(string
  currentPage)
          {
              return (int.Parse(currentPage) +
  1).ToString();
          }
How can I call the NextPage method from the view?
thanks!