如题.想实现下面的效果:
根据图片名称显示图片。1、鼠标放到repeater显示的某一行时,自动显示右边的图片。
我的代码(怎么取出name值呢)
<asp:Repeater ID="List" DataSourceID="sqlDsOrders" runat="server">
<HeaderTemplate>
<table class="grid" cellspacing="0" rules="all" border="1" style="border-collapse: collapse;">
<tr>
<th scope="col"> </th>
<th scope="col"> Name </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr onmouseover="this.style.backgroundColor='pink'" onmouseout="this.style.backgroundColor='FloralWhite' " class=' <%# (Container.ItemIndex%2==0) ? "row" : "altrow" %>'>
<td class="rownum"> <%# Container.ItemIndex+1 %> </td>
<td style="width: 80px;"> <%# Eval("Name")%> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
谢谢,在线等.
根据图片名称显示图片。1、鼠标放到repeater显示的某一行时,自动显示右边的图片。
我的代码(怎么取出name值呢)
<asp:Repeater ID="List" DataSourceID="sqlDsOrders" runat="server">
<HeaderTemplate>
<table class="grid" cellspacing="0" rules="all" border="1" style="border-collapse: collapse;">
<tr>
<th scope="col"> </th>
<th scope="col"> Name </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr onmouseover="this.style.backgroundColor='pink'" onmouseout="this.style.backgroundColor='FloralWhite' " class=' <%# (Container.ItemIndex%2==0) ? "row" : "altrow" %>'>
<td class="rownum"> <%# Container.ItemIndex+1 %> </td>
<td style="width: 80px;"> <%# Eval("Name")%> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
谢谢,在线等.
解决方案 »
- C# 获取选择目录下所有指定类型文件的算法优化
- button响应事件问题
- 求助:C/S中,客户端查询数据库的解决方法
- Socket连接前握手问题
- ASP.NET中如何调用外部程序?
- 求一个算法
- Use c# socket to send data to server socket,socket.connected=true from client, when send data to
- C#.net开发的网站,为何第一次打开页面这么慢,有时候要等个5、6秒钟
- EnyimMemcached 谁用过 编译通过启动和 调式出问题.
- 打开dwg文件报错 未处理 FileNotFoundException
- 怎么用C#做一个快捷方式的软件?
- 使用C#开发托管directX的拾取问题
var name = document.getElementById("单元格ID").innerText
///jsfunction fn_showimage(id)//显示
{
document.getElementById('id').style.display='block';
}
function fn_hiddenimage(id)//根据ID隐藏
{
document.getElementById('id').style.display='none';
}
///.cs
<ItemTemplate>
<tr
onmouseover="this.style.backgroundColor='pink';fn_showimage(<%# Container.ItemIndex+1 %>)"
onmouseout="this.style.backgroundColor='FloralWhite';;fn_hiddenimage(<%# Container.ItemIndex+1 %>) "
class=' <%# (Container.ItemIndex%2==0) ? "row" : "altrow" %>'>
<td class="rownum"> <%# Container.ItemIndex+1 %> </td>
<td style="width: 80px;">
<a href="javascript:void(0);" onclick=><%# Eval("Name")%>
<div id=<%# Container.ItemIndex+1 %> style="display:none;">
<img src='<%#Eval(绑定地址)%>'/></div></td>
</tr>
</ItemTemplate>
里放一个