473,785 Members | 2,395 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 4307
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
1944
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
1211
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
2973
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
2106
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
1933
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
10356
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8986
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...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
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
5390
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
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
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.