c# - Paging and Sorting Grid in ASP.NET MVC -
I am trying to apply the paging and sorting list in ASP.NET MVC without using the MVContrib grid or Javascript (Should be SEO friendly).
I have created my action with the following actions:
Actionless list (anti-page, string sort, string direction);
I have problems though paging and working layoffs are both available. For example, say I have the following code:
& lt;% = html.ActionLink ("title", "list", new {sort = "title", direction = "ASC "}) & Gt%;
I expected this to generate a URL that contains all the existing root values (including the current page), but it is not. So when you click on the link, the page is set to an empty space.
I have seen all overloads for the ActionLink helper but nothing seems like it will help. What I need to do effectively is generating links with url / current page value (or potentially any other root value) and new types of parameters.
I appreciate it if someone can help thank you.
You have to type your own HTML helper, which is easy to do, to do the following Use:
public static class MyExtensions {public static string MyActionLink (This HtmlHelper HTML, ...) {// Definition, Return String}}
And use it to build self-information to obtain information about current requests (to remove existing root values and to existing With industries to add them you can find information within HTML helper ...
HTH.
Comments
Post a Comment