问题是这样的:我用Datalist显示数据库表格的各个记录的一个字段值(比如图片字段),然后用鼠标悬浮在图片的上方,我想在图片上面弹出一个div(不透明或半透明的那种),显示包括图片字段在内的其他字段的字段名和字段值。这个如何实现,大家知道的指点一下。感谢!

解决方案 »

  1.   

    就是给控件的属性赋值啊,ToolTip属性赋值不行吗/
      

  2.   

    ToolTip属性貌似不能绑定数据库里的字段值
      

  3.   

    Tooltip可以绑定
    <asp:ImageButton ID="image1" ToolTip='<%# Eval("字段名")%>' runat="server" ")%>'/>
    放到datalist中类似这样
      

  4.   


    <asp:DataList ID="datalist" runat="server"  RepeatColumns="1" CellPadding="3"  >
          <HeaderTemplate >
             <asp:Label ID="lbl" runat="server"  Text="Show Header"></asp:Label>
          </HeaderTemplate>     <ItemTemplate >
            <asp:TextBox ID="txtid" runat="server"  Text='<%#Eval("productid") %>' ToolTip ='<%#Eval("ProductName") %>' ></asp:TextBox>
           
         </ItemTemplate>
         
              <FooterTemplate >
               <asp:Label ID="lblFoot" runat="server"  Text="Show Footer"></asp:Label>
              </FooterTemplate>
              
         </asp:DataList>