none
如何添加并使用AspNetPager RRS feed

  • 问题

  • <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPass.aspx.cs" Inherits="Flow_MyPass" %>

    <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title></title>
      <link href="../CSS/CSS.css" rel="stylesheet" type="text/css" />
      <script type="text/javascript" src="../Celend/popcalendar.js"></script>
    </head>
    <body>
      <form id="form1" runat="server">
      <table border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="100%">
      <tr height="30">
      <td width="3%" background="../image/11.gif" align=center><IMG height="16" src="../image/right.gif"></td>
      <td background="../image/11.gif" width="80"><b>已经审批列表</b></td>
      <TD background="../image/11.gif" align="right">
      </TD>
      </tr>
     </table>
     <table align="center" border="0" cellpadding="1" cellspacing="0" width="100%">
      <tr>
      <td style="height: 28px"></td>
      </tr>
      <tr>
      <td align="center" style="height: 146px">
      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
      <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
      <Columns>
      <asp:BoundField DataField="Title" HeaderText="主题" />
      <asp:TemplateField HeaderText="工作流程">
      <ItemTemplate>
      <asp:Label ID="lblFlow" runat="server"><%# getFlow(DataBinder.Eval(Container.DataItem,"FlowID").ToString()) %></asp:Label>
      </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="申请人">
      <ItemTemplate>
      <asp:Label ID="lblUser" runat="server"><%# getUser(DataBinder.Eval(Container.DataItem,"UserID").ToString()) %></asp:Label>
      </ItemTemplate>
      </asp:TemplateField>
      <asp:BoundField DataField="PubDate" HeaderText="申请时间" />
      <asp:TemplateField HeaderText="查看">
      <ItemTemplate>
      <a href="ArchivesInfo.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>">查看</a>
      </ItemTemplate>
      </asp:TemplateField>
      </Columns>
      <RowStyle BackColor="#EFF3FB" />
      <EditRowStyle BackColor="#2461BF" />
      <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
      <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
      <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
      <AlternatingRowStyle BackColor="White" />
      </asp:GridView>
       
      </td>
      </tr>
      <tr>
      <td align="center">
      <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="第<font color='red'><b>%CurrentPageIndex%</b></font>页 共:%PageCount%页&nbsp; %StartRecordIndex%-%EndRecordIndex%"
      CustomInfoTextAlign="Center" FirstPageText="【首页】" Height="25px" HorizontalAlign="Center"
      InputBoxStyle="width:19px" LastPageText="【尾页】" NextPageText="【下页】 " 
      PrevPageText="【前页】 " ShowCustomInfoSection="Left" ShowInputBox="Always" ShowNavigationToolTip="True"
      Width="635px" OnPageChanged="AspNetPager1_PageChanged">
      </webdiyer:AspNetPager>
      </td>
      </tr>
      <tr>
      <td style="height: 14px">
      <asp:Label ID="lblCount" runat="server"></asp:Label></td>
      </tr>
      </table>
      </form>
    </body>
    </html>

    运行时出错,并提示如下:1、<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>此句未能加载文件或程序集“AspNetPager”或它的某一个依赖项。系统找不到指定的文件。

    2、<webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="第<font color='red'><b>%CurrentPageIndex%</b></font>页 共:%PageCount%页&nbsp; %StartRecordIndex%-%EndRecordIndex%"
      CustomInfoTextAlign="Center" FirstPageText="【首页】" Height="25px" HorizontalAlign="Center"
      InputBoxStyle="width:19px" LastPageText="【尾页】" NextPageText="【下页】 " 
      PrevPageText="【前页】 " ShowCustomInfoSection="Left" ShowInputBox="Always" ShowNavigationToolTip="True"
      Width="635px" OnPageChanged="AspNetPager1_PageChanged"> 此处错误是:未知的服务器标记“webdiyer:AspNetPage”
    2010年5月12日 12:43

答案