本帖最后由 is__ing 于 2011-08-12 09:39:02 编辑

解决方案 »

  1.   

         <% if (ds.Tables[0].Rows.Count > 0)
                 {
                   for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                   {
               %>
     <tbody  id="shuju">    
              <tr >
                <th  style=" border:1px solid #d1d6d7" height="30"><%=((currtentpage - 1) * pagesize + i + 1)%></th>
                <th  style=" border:1px solid #d1d6d7"  height="30" ><%=IsNull( ds.Tables[0].Rows[i]["user_id"].ToString())%></th>
                <th   style=" border:1px solid #d1d6d7"  height="30"><%=IsNull(ds.Tables[0].Rows[i]["create_time"].ToString())%></th>
                <th   style=" border:1px solid #d1d6d7" height="30" ><%=IsNull(ds.Tables[0].Rows[i]["money"].ToString())%></th>
                <th  style=" border:1px solid #d1d6d7"  height="30" ><%=IsNull(ds.Tables[0].Rows[i]["re"].ToString())%></th>         </tr>
     </tbody>
                   <%}
           }
           else { 
           
                %>
                   <tbody>
                        <tr>
                            <td colspan="12"><img   style=" height:320px; width:100%" src="../../images/cus/clear.gif" /></td>
                        </tr>
                    </tbody>
                <%
           }%> 后台 public DataSet ds = new DataSet();
      

  2.   

    我的后台取到了一个listusing System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using We7.CMS.WebControls;
    using We7.CMS.WebControls.Core;
    using We7.CMS.Accounts;
    using We7.CMS.Common.PF;
    using System.Collections.Generic;namespace We7.CMS.Web.Widgets
    {
        [ControlGroupDescription(Label = "本子列表", Icon = "本子列表", Description = "本子列表", DefaultType = "本子列表")]
        [ControlDescription(Desc = "本子列表")]    public partial class Bookmanage_List : BaseControl
        {
            IAccountHelper AccountHelper = AccountFactory.CreateInstance();
            List<Book> booklists;
            /// <summary>
            /// 页面加载
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            protected void Page_Load(object sender, EventArgs e)
            {
                booklists = AccountHelper.GetBookList(Security.CurrentAccountID);
                Page.DataBind();
            }    }
    }前台想要拿到这个booklists 用于显示
    按照你的方法直接写  提示找不到