In a project, we often encounter situations where we need to look at the details of all the fields in a datasheet, we usually display some of the necessary fields such as IDs, and then put the other fields together on DetailView or another page, and then provide a LinkButton for "view details." Or use a script to eject another web window. These practices are slightly lame, if only for "view Details" and view the details (amount, some clumsy), we have a better solution, using DIV+CSS to achieve similar ToolTip effect.
As we all know, some HTML elements or ASP.net controls have a property called ToolTip. This property is mainly to display some hints and descriptive information when the mouse is moved. Unfortunately, it cannot embed HTML code like the innerHTML attribute. Like what: <asp:image id= "Image1" imageurl= "~/images/more.gif" tooltip= "<b> earthquake relief Concerted effort </b>" runat= "Server"/ >
<asp:label id= "Label2" runat= "Server" text= "<b> earthquake relief Concerted effort </b>" ></asp:Label>
Operation Effect as shown:
Did not achieve the effect we expected, OK, below we use DIV+CSS to achieve the desired effect within the GridView template.
First, we add a data source control.
<asp:sqldatasource
id= "SqlDataSource1"
runat= "Server"
ConnectionString= "<%$ Connectionstrings:mysqlconnectionstring%> "
providername= "System.Data.SqlClient"
&n