I am using the example martijn Boland's to page.
The url of my app changes when I click on the page numbers:
http://localhost:1202/Issue?page=6
So far so good.
The problem is when I add a dropdownlist that submits on change, I can not page as well as filter.
If I change my dropdown, I should pass the projectId in the querysting, my partail view will refresh and display my filtered recoreds.
Now when I page the filter parameter does not stick in the querystring as well as the selection in my dropdown does not stick.
How can I page as well as filter?
Index.aspx
<form id="form-post-project-selection" class="post-comments" method="get">
<label for="Country">Project:</label>
<%= Html.DropDownList("ProjectList", "--All--") %>
</form>
<% Html.RenderPartial("MyIssues", Model); %>
<script type="text/javascript">
$("#form-post-project-selection").submit(function(evt) {
var frm = $("#form-post-project-selection");
var action = frm.attr("action");
var serializedForm = frm.serialize();
var projectId = jQuery.trim($("ProjectList").val());
if (projectId.length < 1 || projectId == "-1")
return;
});
$("#ProjectList").change(function() {
$("#form-post-project-selection").submit();
});
</script>