Avatar of vcharles
vcharles
 asked on

Help with highlighting rows with mouseover of a checkbox list web control?

Hi,

When I place my mouse over a row, only the checkbox is highlighted, how do you also highlight the text in the row?

V.
ASP.NET

Avatar of undefined
Last Comment
vcharles

8/22/2022 - Mon
Ramkisan Jagtap

vcharles

ASKER
Thanks for the code. Do you know the vb.net version of the code below?

foreach (ListItem item in CheckBoxList1.Items)
             {
                 item.Attributes.Add("onmouseover", "javascript:this.className = 'itemStyle'");
                 item.Attributes.Add("onmouseout", "javascript:this.className = ''");
             }
ASKER CERTIFIED SOLUTION
Ramkisan Jagtap

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ramkisan Jagtap

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
vcharles

ASKER
Thanks!
vcharles

ASKER
Hi,

Is their a way to applly the code below for all checkbox list control on my form? instead of repeating the code for each control.

For Each item As ListItem In CheckBoxList1.Items
      item.Attributes.Add("onmouseover", "javascript:this.className = 'itemStyle'")
      item.Attributes.Add("onmouseout", "javascript:this.className = ''")
Next