Paging
<% If(Viewdata. Accounts. ispreviouspage ){ %>
<% = Html. actionlink < Speakoutfreely. controllers. managecontroller > (C => C. List (viewdata. Accounts. pageindex - 1 ), " Previous " ) %>
<% } %>
<% If(Viewdata. Accounts. isnextpage ){ %>
<% = Html. actionlink < Speakoutfreely. controllers. managecontroller > (C => C. List (viewdata. Accounts. pageindex + 1 ), " Next " ) %>
<% } %>
The HTML generated by the next page (next) at the first point
Http: // localhost: 64701/manage/LIST/1
Next)
Generated URL
Http: // localhost: 64701/manage/LIST/1/2
It should be
Http: // localhost: 64701/manage/LIST/2!
Khan, directly the resource cannot be found...
Searched.
Http://www.getknow.taniocha.org/autor-53-1.html
[Quote]
Bug 1
If I create a controller action as follows... public void list (INT category )... and use the mvctoolkit htmlhelper. actionlink <t> as follows... <% = html. actionlink <productcontroller> (x => X. list (category), "view products for this category") %>... it generates the URL http: // server/product/LIST/1 instead of http: // server/product/LIST /? Category = 1 and when I browse to the URL it says "A value is required for parameter 'category 'In Action 'LIST'" [This is due to linkextensions. buildquerystringfromblocked expression always assuming the first parameter shocould be simply appended to the url]
Bug 2 if I create a controller action as follows... public void view (int id )... and use the mvctoolkit htmlhelper. actionlink <t> as follows... <% = html. actionlink <productcontroller> (x => X. view (productid), "view product") %>... it correctly generates the URL http: // server/product/View/1. however, when you navigate to that URL the same link now becomes http: // server/product/View/1/1. [This is because , In linkextensions. buildurl (), the call to urlhelper. action () parses the current URL and includes des any current values (like ID) if it's a call to the same action. so maybe this is a bug with the way urlhelper. action works ?? ]
[/Quote]
I can only write this... depressing... < A Href = "/Manage/LIST/<% = viewdata. Accounts. PageIndex-1 %>" " > Previous Page </ A >
< A Href = "/Manage/LIST/<% = viewdata. Accounts. pageindex + 1%>" " > Next Page </ A >