我使用的例子的Martijn博兰的页面。
当我点击页码我的应用程序的URL发生变化:
http://localhost:1202/Issue?page=6
到现在为止还挺好。
问题是,当我补充一点变化,我不能页面以及过滤提交下拉列表。
如果我改变我的下拉列表中,我应该通过在querysting的专案编号,我partail视图将刷新并显示我的过滤recoreds。
现在,当我网页过滤参数不会在查询字符串坚持,以及在我的下拉不沾的选择。
我怎样才能页面以及过滤器?
的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>