473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
Jun 27 '08 #1
1 4277
Hi,

In the script try

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

and so on.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Robert Smith" <Ro*********@discussions.microsoft.comwrote in message
news:89**********************************@microsof t.com...
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

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul Kaufman | last post by:
What do I add to the style sheet to do this? Thanks. -Paul, the CSS Newbie
6
by: Henry | last post by:
How can I change the text in a link, originally displayed with the "text-decoration:none" attribute to display an underline during the onMouseOver event, and back to its original (non-underlined)...
1
by: Henry Nelson | last post by:
Hi all I'm very new to dotNet and just trying to get my head around the right way to do the thing that I would normally do in asp. In asp I would loop through a recordset and output all the...
9
by: jy836 | last post by:
I was using VB .NET, working on my database application. After running it successfully, I decided to take a little break. So I closed Visual Studio (I saved all files, of course), and when I opened...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
1
by: Richard | last post by:
A menu page has a set of A tages in a UL The menu (in IE) will only get the hover visualization if the mouse rolls over underlined text. I want it to happen if the rollover occurs anywhere in...
6
by: andreas | last post by:
A selected text has fontstyles like bold and italic and underscore I want to remove one of them without changing the other fontstyles. How to do that? Thanks for any response
2
by: george.leithead | last post by:
Hi all, I have a very strange problem! In following Web page (which is generated from a CMS System), the navigation to the left 'dissapears' when you roll the mouse over the links? It does not...
1
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
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"...
4
by: sgxbytes | last post by:
Hi, My html has <Table style="year-button-archive" width="60%" > <tr> <td class="gold" > <a title="year">By Year:</a> <td class="gold"> <a id = "2008"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.