asp.net html表中的表分页

时间:2015-02-18 07:35:44

标签: c# jquery html mysql asp.net

大家好,有没有办法在我的桌子上进行分页?

我的表格在html中编码如下。

<table width="100%"  id="tbl_Delivered">
<tr>
    <td width="30%">
    </td>
    <td width="45%" class="GRIDVIEW_TITLE">
            <asp:Label ID="Label5" runat="server" Text="DELIVERED"></asp:Label>
        </td>
        <td>

        </td>
</tr>
    <tr >
        <td width="30%">
            &nbsp;</td>
        <td width="45%">
            <div id="Delivered" runat="server">

            </div>
        </td>
        <td width="45%">
            &nbsp;
        </td>
    </tr>
</table>

然后我有一个存储过程,将在

中放置另一系列td
<div id="Delivered" runat="server">

                </div>

我的部分存储过程就是这个

 DECLARE @DELIVERED VARCHAR(MAX)
        SELECT @DELIVERED = ''
        SELECT ALL 
        @DELIVERED =   @DELIVERED + '<TR class="GRIDVIEW_DETAILS">' +
                                        '<TD WIDTH ="100" ALIGN="LEFT"><A HREF="/D2MS/wTransmittalSearch.aspx?ref='+RefNumber+'">'+RefNumber+'</A></TD>' +
                                        '<TD WIDTH ="100" ALIGN="LEFT">' +  airwaybillno  + '</TD>' +
                                        '<TD WIDTH ="250" ALIGN="LEFT">' +  RTRIM(UPPER(deliverto))  + '</TD>' +        
                                    '</TR>' 
        FROM #temp_delivered
        --ORDER BY deliverdate DESC
        SET @DELIVERED = 
        '<TABLE WIDTH="100%">' +
        '<TR  class="GRIDVIEW" ><TD >REFERENCE #</TD><TD>AIRWAYBILL #</TD><TD ALIGN="LEFT">DELIVER TO</TD></TR>' +
        + @DELIVERED + 
        '</TABLE>'

    select @DELIVERED AS HTML from #temp_delivered

然后我有一个c#代码将我的html代码从存储过程附加到网页

protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            dsView = dm.ViewDelivered(Session["Username"].ToString());
            //gridsummary.DataSource = dsView.Tables[0];
            //gridsummary.DataBind();

            #region old
            string sDelivered = string.Empty;
            DataTable dt = new DataTable();
            dt = dsView.Tables[0];
            List<string> slistPostal = new List<string>();
            foreach (DataRow dr in dt.Rows)
            {
                if (dr[0].ToString() == "DELIVERED")
                {
                    sDelivered = dr["HTML"].ToString();
                    Delivered.InnerHtml = sDelivered;
                }

            }
            #endregion

        }
    }

我正在加载很多数据,所以我想在我的表中进行分页,有没有办法做到这一点?提前谢谢。

对于Tomer Klein来说,这是错误

enter image description here

0 个答案:

没有答案