• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

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