• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 643
  • Last Modified:

onmouseover row in repeater

I have a repeater and i want to first of all change the row color inside the itemtemplate, the following code doesnt work when i put it inside the tr tag in the itemtemplate, which i have no idea why.

style="background-color:red;"

The main goal i want to accomplish is to change the color of the row on mouse over and change it back on mouse out.  can anyone help?
0
DB_Fury
Asked:
DB_Fury
1 Solution
 
kumarnimavatCommented:
Please see the link given below. Hope this helps you!

http://forums.asp.net/t/1654974.aspx/1?chang+row+color+in+mouse+over+in+repeater
0
 
mayank_joshiCommented:
this is a sample code of repeater with row color changing on onmouseover event
and reverting back to original on onmouseout event:-

.aspx page:-
<asp:Repeater ID="Repeater1" runat="server">
                        <HeaderTemplate>
                            <table border="1">
                                <tr>
                                    <th>
                                        Heading
                                    </th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr style="background-color: red" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='red'" >
                                <td>
                                    <%#Container.DataItem("content")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>

Open in new window




0
 
DB_FuryAuthor Commented:
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now