<asp:DataList ID="DataList1" runat="server"
     Border="1" BorderColor="Black"
     CellPadding="2" CellSpacing="0"
     SelectedItemStyle-BackColor="#FFFFFF" 
     HeaderTemplate-ColSpan="3"
 OnItemCommand="DataList_ItemCommand"
     Width="500">
-----><asp:DataList ID="DataList1" runat="server"
     Border="1" BorderColor="Black"
     CellPadding="2" CellSpacing="0"
     SelectedItemStyle-BackColor="#FFFFFF" 
     HeaderTemplate-ColSpan="3"
     Width="500">

解决方案 »

  1.   

    OnItemCommand="DataList_ItemCommand"
    不存在DataList_ItemCommand方法
      

  2.   

    删了这句还是没显示
    <asp:LinkButton ID="detail" runat="server" Text="查看详细内容" ForeColor="#3333FF"/>
    <asp:LinkButton ID="title"  runat="server" Text="关闭" ForeColor="#3333FF"/>
    这些内容啊
      

  3.   

    就是在iis运行时,asp:LinkButton 这个控件没有显示出来
    只有留言簿这三个字,其他什么都没有
      

  4.   

    你运行是没绑定啊加上
    vodi page_Load(object sender, EventArgs e)
    {
    BindGrid();
    }当页面加载时进行数据绑定
      

  5.   

    还是不行哦,它出先新情况
    Server Error in '/hao' Application.
    --------------------------------------------------------------------------------Object reference not set to an instance of an object. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:1. Add a "Debug=true" directive at the top of the file that generated the error. Example:  <%@ Page Language="C#" Debug="true" %>or:2) Add the following section to the configuration file of your application:<configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.  Stack Trace: 
    [NullReferenceException: Object reference not set to an instance of an object.]
       ASP.chenggongfou_aspx.BindGrid() +109
    上面是出错提示
       ASP.chenggongfou_aspx.page_Load(Object sender, EventArgs e) +5
       System.Web.UI.Control.OnLoad(EventArgs e) +67
       System.Web.UI.Control.LoadRecursive() +35
       System.Web.UI.Page.ProcessRequestMain() +731