日期:2014-05-17  浏览次数:20475 次

asp.net简单问题
在.aspx中代码如下:

        <ItemTemplate>
            <table class="hsdContent" style="width:100%;" >
                <tr class="OldLine" onmouseover="style.background-color:'#C86F70'">
                    <td style="width:10%;"><%#Eval("HSDID") %></td>
                    <td style="width:60%;text-align:left;"><%#Eval("Title") %></td>
                    <td style="width:10%;"><%#Eval("Status") %></td>
                    <td style="width:10%;"><asp:ImageButton ID="Index_Reproduce" runat="server" ImageUrl="image/ReproduceButton.jpg" OnClick="Reproduce_Click"/></td>
                    <td style="width:10%;"><asp:ImageButton ID="Index_Submit" runat="server" ImageUrl="image/SubmitButton.jpg" CommandName="Edit" CommandArgument='<%#Eval("id")+","+Eval("HSDID")%>' OnClick="Edit_Click" /></td>                    
                </tr>
            </table>
        </ItemTemplate> 

我想要是的当出表移动到该行时,改变这行的背景色。写法如上为什么不可行呢?请帮帮忙 谢谢!
我用响应事件做 试了下,在.aspx.cs中不响应对应函数。

------解决方案--------------------
onmouseover="这里是js函数"
------解决方案--------------------
like these:
http://www.cnblogs.com/insus/archive/2011/06/25/2090071.html