Problem with ASP.NET MVC 2 Routing
I have the following URL:
http://localhost/PagingController/ShowPage?pageNumber=3
When user clicks this link he must be redirected to the following URL:
http://localhost/MyController/ MyAction?pageNumber=3
How can I create a开发者_如何学Python mapping rule for these URLs? I don't understand how to get pageNumber parameter with URL templates such as .../{controller}/{action}
Thanks.
You don't have to define a route for it. If you use querystring, you can just get it in the action like this:
public ActionResult MyAction(int pageNumber)
精彩评论