【发布时间】:2010-07-12 13:48:51
【问题描述】:
我正在使用 asp.net 2.0 和 c#。
我有一个数据网格,其中有一个图像控件,即
<asp:Image ID="ImagePreview" runat="server" Width="62px" Height="62px" />
我从后面的代码中设置图像 URL,即图像存在于物理文件夹中。 我想在鼠标悬停时打开一个带有图像的弹出窗口。
请帮助我。 提前致谢。
如果需要任何其他信息,请告诉我。
【问题讨论】:
我正在使用 asp.net 2.0 和 c#。
我有一个数据网格,其中有一个图像控件,即
<asp:Image ID="ImagePreview" runat="server" Width="62px" Height="62px" />
我从后面的代码中设置图像 URL,即图像存在于物理文件夹中。 我想在鼠标悬停时打开一个带有图像的弹出窗口。
请帮助我。 提前致谢。
如果需要任何其他信息,请告诉我。
【问题讨论】:
请为此使用 JavaScript:
ImagePreview.Attributes.Item("onMouseOver") = "javascript:window.open('localhost','newWindow','width=200,height=200')";
【讨论】:
试试jQuery Tooltips,可以把图片预览放在tooltip里。 http://flowplayer.org/tools/tooltip/index.html
我已经在 GridView 控件的列中实现了这一点,效果很好
【讨论】: