473,796 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Ite mCommand" >
<HeaderTemplate >
<table width="100%" style="font: 8pt verdana;
text-align:left;">

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

<ItemTemplate >
<tr style="backgrou nd-color:#FFECD8" >
<td><a href= <span class="MouseOut ";
onmouseover="cl ass='MouseOver' " ><%# DataBinder.Eval (Container.Data Item,
"UserId")%> </span></a></td>
<td><a href= <span class="MouseOut ";
onmouseover="cl ass='MouseOver' ;"><%# DataBinder.Eval (Container.Data Item,
"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:unde rline;}

</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 4309
Hi,

In the script try

onmouseover="th is.className='M ouseOver';"

and so on.

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Robert Smith" <Ro*********@di scussions.micro soft.comwrote in message
news:89******** *************** ***********@mic rosoft.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_Ite mCommand" >
<HeaderTemplate >
<table width="100%" style="font: 8pt verdana;
text-align:left;">

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

<ItemTemplate >
<tr style="backgrou nd-color:#FFECD8" >
<td><a href= <span class="MouseOut ";
onmouseover="cl ass='MouseOver' " ><%# DataBinder.Eval (Container.Data Item,
"UserId")%> </span></a></td>
<td><a href= <span class="MouseOut ";
onmouseover="cl ass='MouseOver' ;"><%# DataBinder.Eval (Container.Data Item,
"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:unde rline;}

</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
9482
by: Paul Kaufman | last post by:
What do I add to the style sheet to do this? Thanks. -Paul, the CSS Newbie
6
2391
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) state for the onMouseOut? I'm pretty sure that it's of the format document.<itemname>.attribute = value but beyond that I'm not sure, and I can't find enough of a reference to let me proceed. I'd also like, as an alternative, to be able to...
1
1945
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 html dynamically for the layout I want. I have seen some examples of using a repeater and they seem to be the thing to use when you don't want a table of results, but I'm not sure how to change the <ItemTemplate> depending on the contents of the...
9
1212
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 my solution later, the application had several bugs which hadn't been there earlier. I had to manually look through the code to figure out what had been changed and fix the problems. It wasn't a lot of work, but I'm concerned that if VS ..NET...
7
2975
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 already formatted as "Shopping" ---Bold "for" -----Regular Now I want to underline whole text by preserving old style i.e. Bold and
1
8394
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 the A cell (which appears to have been expanded to fill the LI container it is in). In FF 1.0.5.2 and Opera 9 things work as expected. How might the CSS be changed to ensure (in IE) the mouse rolling over
6
7143
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
2107
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 do this in all browsers either. I have found it to happen in IE 7 and the latest patched IE 6. I have tried to find out the reason, but keep finding strange behaviour! You will see at the bottom of the HTML, I have a comment. If you follow...
1
416
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" OnItemCommand="rptUserList_ItemCommand" >
4
1934
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" title="2008" href="../announcementList.do?year=2008"> 2008
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.