changing the text to underline on mouse over in a repeater row

R

Robert Smith

Hi,
I have a repeater control with rows in made of of link buttons so that
they react to a click as below:


<div>
<ASP:Repeater id="rptUserList" runat="server"
OnItemCommand="rptUserList_ItemCommand" >


<HeaderTemplate>
<table width="100%" style="font: 8pt verdana;
text-align:left;">

<tr style="background-color:#DFA894">
<td><b>UserId</b></td>
<td><b>Name</b></td>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr style="background-color:#FFECD8" >
<td><a href= <span class="MouseOut";
onmouseover="class='MouseOver'" ><%# DataBinder.Eval(Container.DataItem,
"UserId")%></span></a></td>
<td><a href= <span class="MouseOut";
onmouseover="class='MouseOver';"><%# DataBinder.Eval(Container.DataItem,
"Name") %></span></a> </td>

</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:Repeater>

I also have the following styles

<style type="text/css" >

.MouseOut {text-decoration:none;}
.MouseOver {text-decoration:underline;}

</style>

On loading the repeater control is picking up the initial class mouseout and
displaying the text in the row without an underline, however when you
mouseover the row it doesn't pick up the new class MouseOver, please can you
tell me how I can change the text to underline on moving the mouse over the
row.

Thanks in advance
Robert
 
T

Teemu Keiski

Hi,

In the script try

onmouseover="this.className='MouseOver';"

and so on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top