1

I stuck with one simple thing:

I have URL http://mydomain.com/PagedPage?Page=1&PageSize=30&SortOrder=Name

I want to pass list of parameters as parameter to my custom Html.Pager helper but inside pager I should be able to edit the parameter "Page"

Is it possible to do without hardcoding data?


UPDATED: in cshtml page I have this helper (it is custom helper) @Html.Pager(Model.Page, Model.TotalPages, Model.TotalRecords, )

Inside pager I want to generate links: Page=1, Page=2, Page=3 etc but also ALL parameters which were passed inside html helper must be included.


Thank you!

tereško
  • 57,247
  • 24
  • 95
  • 149
Sergey
  • 7,685
  • 15
  • 47
  • 76

1 Answers1

1

Yes Request.QueryString is the querystring, change one of the entries in the querystring, add rest of them and create a new querystring and pass that to the next page.

iefpw
  • 6,436
  • 15
  • 51
  • 76
  • Thank you! Also this question and answer helped me a lot http://stackoverflow.com/questions/3865975/namevaluecollection-to-url-query – Sergey Mar 29 '13 at 18:43
  • Please vote my question I am sure I am not single person who looked on it – Sergey Mar 29 '13 at 18:44