分页代码
 <asp:DataPager runat="server" ID="DataPager" PagedControlID="listView" PageSize="1">
                    <Fields>
                        <asp:TemplatePagerField>
                        <PagerTemplate>
                        <strong>共<b><%# Container.TotalRowCount %></b>条信息</strong>
                        </PagerTemplate>
                        </asp:TemplatePagerField>
                         <asp:NextPreviousPagerField FirstPageText="首页" ShowFirstPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" LastPageText="尾页" />
                          <asp:NextPreviousPagerField PreviousPageText="上一页" ShowNextPageButton="False" />
                          <asp:NextPreviousPagerField NextPageText="下一页" ShowPreviousPageButton="False" />
                         <asp:NextPreviousPagerField LastPageText="尾页" ShowLastPageButton="True" ShowNextPageButton="False"
                            ShowPreviousPageButton="False" FirstPageText="首页" />
                           <asp:TemplatePagerField>
                           <PagerTemplate>
                           <strong>页次:<b><%# Container.TotalRowCount>0 ? (Container.StartRowIndex / Container.PageSize) + 1 : 0 %></b>/<%# Math.Ceiling ((double)Container.TotalRowCount / Container.PageSize) %>页</strong>
                        </PagerTemplate>
                        </asp:TemplatePagerField>
                    </Fields>
                </asp:DataPager>
UrlRewriter 重写后 分页代码form   <form method="post" action="news-0-14-3.html?id=0&amp;tab=14&amp;nav=3" id="MasterForm">页面地址 为http://XXXXXX/news/news-0-14-3.html
点击下一页的时候  地址栏出现http://XXXXXX/news/news-0-14-3.html?id=0&tab=14&nav=3
有大侠帮忙解决下马 !!!

解决方案 »

  1.   

    RewriteRule ^(.*)/news-(\d+)-(\d+)-(\d+)\.html$  $1/newsList.aspx\?id=$2&tab=$3&nav=$4正则
      

  2.   

    你的action里面前面几个参数不是都有了吗  为啥又要重新写一遍
    直接news-0-14-3.html这种格式就行了吧??还有重写伪静态的时候  在页面回发时能会出问题
    可以看看这篇文章
    ASP.NET URL伪静态重写实现方法
      

  3.   

    同意LS的,既然用了伪静态,为何会要这样news-0-14-3.html?id=0&amp;tab=14&amp;nav=3带参数呢?news-0-14-3.html这样就能匹配正则了,应该是分页链接处理的问题
      

  4.   

    下个ActionlessForm.dll放你项目里。
    在分页页面页头注册下
    <%@ Register TagPrefix="skm" Namespace="ActionlessForm" Assembly="ActionlessForm" %>
    然后form 改成<skm:Form></skm:Form>