本帖最后由 cooliesky 于 2009-07-21 00:15:19 编辑

解决方案 »

  1.   

    <asp:Panel ID ="Panel7" runat ="server"> 
    <asp:ImageButton  Width="108px" Height ="88px"  runat ="server" ID ="ImageButton01"  ImageUrl =' <%#"upload/"+DataBinder.Eval(Container.DataItem,"img") %>' PostBackUrl='product_view.aspx?ID= <%#  DataBinder.Eval(Container.DataItem,"id")%>' OnClick ="ImageButton_click" /> 
    </asp:panel> //这个丢上面去!
      

  2.   

    product_view.aspx?ID= <%#  DataBinder.Eval(Container.DataItem,"id")%>
    我想将上面一行在.aspx中的ID的值放到.cs如下面的语句中,将'" + Request["id"] + "'换掉,又应该怎么办呢?谢谢各位了:
    string strSel = "select * from product where class1='" + Request["id"] + "' order by clng(order1) asc";
      

  3.   


    --------------------不好意思,放到上去后:出了如下错误误了,应该是不能移出DataList 控件外吧----
    编译器错误信息: CS0117: “System.Web.UI.Page”并不包含“DataItem”的定义
      

  4.   

    这个事件应该在
     <asp:DataList ID="DataList1" runat="server" OnCancelCommand="DataList1_CancelCommand">
        </asp:DataList>protected void DataList1_CancelCommand(object source, DataListCommandEventArgs e)
        {
      Panel7.Visible = false; 
            panel8.Visible = true; 
        }里触发事件
    具体的你在想想