<webdiyer:AspNetPager ID="AspNetPager1" runat="server"
        onpagechanged="AspNetPager1_PageChanged" UrlPaging="true"  EnableUrlRewriting="True"  
        UrlRewritePattern="list%PicID%_%Type%_{0}.html"  >
    </webdiyer:AspNetPager>protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["PicID"] != "" && Request.QueryString["PicID"] != null && Request.QueryString["Type"]!=""&&Request.QueryString["Type"]!=null)
            {
                GetPicModel(Request.QueryString["PicID"],Request.QueryString["Type"]);
                GetimgIndex(Request.QueryString["PicID"]);
            }
        }
    }
    public void GetPicModel(string ID, string Type)
    {
        DataSet ds = picManager.GetList(" VehicleType='" + ID + "' and ImageCategory='" + Type + "'");        this.AspNetPager1.RecordCount = int.Parse(ds.Tables[0].Rows.Count.ToString());
        this.AspNetPager1.PageSize = 2;
        this.AspNetPager1.AlwaysShow = true;
        DataSet dsPicList = picManager.GetListPage(AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, " and VehicleType='" + ID + "' and ImageCategory='" + Type + "' ");        dlPicList.DataSource = dsPicList;
        dlPicList.DataBind();
         ViewVehicleTypeManager viewCarManager = new ViewVehicleTypeManager();
         DataSet dsmodel = viewCarManager.GetList(" ID='"+ID+"'");
        if (dsmodel.Tables[0].Rows.Count > 0)
        {
            this.Title = dsmodel.Tables[0].Rows[0]["TypeName"].ToString();
            UrlBrand.HRef = "carBrand.aspx?BID=" + dsmodel.Tables[0].Rows[0]["BrandID"].ToString();
            UrlVehiclePic.HRef = "carModel.aspx?carID=" + dsmodel.Tables[0].Rows[0]["ID"].ToString();
            litUrlBrand.Text = dsmodel.Tables[0].Rows[0]["BrandName"].ToString();
            litUrlVehiclePic.Text = dsmodel.Tables[0].Rows[0]["TypeName"].ToString();
        }
    }    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        GetPicModel(Request.QueryString["PicID"], Request.QueryString["Type"]);
    }
<a herf = "list20100613140122687_外饰图.html"></a>
 <!--图片列表重写规则-->
      <RewriterRule>
        <LookFor>~/list(\d*)_([\s\S]*).html</LookFor>
        <SendTo>~/piclist.aspx?PicID=$1&amp;Type=$2</SendTo>
      </RewriterRule>
      <!--图片列表重写规则-->
      <RewriterRule>
        <LookFor>~/list(\d*)_([\s\S]*)_(\d{1,}).html</LookFor>
        <SendTo>~/piclist.aspx?PicID=$1&amp;Type=$2&amp;page=$3</SendTo>
      </RewriterRule>每次点击<a herf = "list" + ID + "_外饰图.html"></a>这个跳转到/list20100613140122687_内饰图.html这里页面
然后我点击第二页的话  就没有数据出来了
地址栏是改变了 list20100613140122687_内饰图_2.html   请各位大虾解决一下

解决方案 »

  1.   

    <SendTo>~/piclist.aspx?PicID=$1&amp;Type=$2&amp;page=$3</SendTo>
    改成
    <![CDATA[~/piclist.aspx?PicID=$1&Type=$2&page=$3]]>
      

  2.   

    少了点东西
    <SendTo>~/piclist.aspx?PicID=$1&amp;Type=$2&amp;page=$3</SendTo>
    改成
    <SendTo><![CDATA[~/piclist.aspx?PicID=$1&Type=$2&page=$3]]></SendTo>
      

  3.   

    这个有什么不一样吗    我现在的问题是
    每次点击<a herf = "list20100613140122687_外饰图.html"></a>这个跳转到/list20100613140122687_内饰图.html这里页面
    然后我点击第二页的话 地址栏是改变了 list20100613140122687_内饰图_2.html 但是没有数据了 
      

  4.   

    你先在地址栏中访问/piclist.aspx?PicID=20100613140122687&Type=内饰图&page=2看有没有数据