Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8727613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:28:02+00:00 2026-06-13T08:28:02+00:00

I use a ListView and I want if I make a mouseover about the

  • 0

I use a ListView and I want if I make a mouseover about the Item I get a other color and a other font size and font color…the other color works but can I do two or more styleschanges in the mouseover?

Here my ListView:

<asp:ListView runat="server" ID="myListView" OnItemCommand="myListView_ItemCommand"
                       OnSelectedIndexChanging="myListView_SelectedIndexChanging" 
            > 


            <LayoutTemplate>
                <table runat="server" class="tablelistview" cellpadding="0" cellspacing="0">
                <tr class="TableClass">
                    <th align="left" runat="server"><asp:LinkButton ID="lnkLastname" runat="server" CssClass="MyLink" OnClick="lnkLastnameSort_Click" >Nachname</asp:LinkButton>
                    <asp:Image runat="server" ID="imgLastnameAsc" ImageUrl="~/App_Theme/asc.png" />
                    <asp:Image runat="server" ID="imgLastnameDESC" ImageUrl="~/App_Theme/desc.png" Visible="false" />
                    </th>

                    <th class="TableColumns"  runat="server"><asp:LinkButton ID="lnkFirstname" CssClass="MyLink" runat="server" OnClick="lnkFirstnameSort_Click" >Vorname</asp:LinkButton>
                    <asp:Image runat="server" ID="imgFirstnameAsc" ImageUrl="~/App_Theme/asc.png" Visible="false" />
                    <asp:Image runat="server" ID="imgFirstnameDesc" ImageUrl="~/App_Theme/desc.png" Visible="false" />
                    </th>

                    <th class="TableColumns" runat="server"><asp:Label ID="lnkPhone" runat="server" >Telefon</asp:Label></th>

                    <th class="TableColumns" runat="server"><asp:LinkButton ID="lnkDepartment" CssClass="MyLink" runat="server" OnClick="lnkDepartmentSort_Click">Abteilung</asp:LinkButton>
                    <asp:Image runat="server" ID="imgDepartmentAsc" ImageUrl="~/App_Theme/asc.png" Visible="false" />
                    <asp:Image runat="server" ID="imgDepartmentDesc" ImageUrl="~/App_Theme/desc.png" Visible="false" />
                    </th>

                    <th class="TableColumns" runat="server"><asp:LinkButton ID="lnkemail" CssClass="MyLink" runat="server" OnClick="lnkMailSort_Click" >Email</asp:LinkButton>
                    <asp:Image runat="server" ID="imgMailAsc" ImageUrl="~/App_Theme/asc.png" Visible="false" />
                    <asp:Image runat="server" ID="imgMailDesc" ImageUrl="~/App_Theme/desc.png" Visible="false" />
                    </th> 

                </tr>
                <tr runat="server" id="ItemPlaceholder">
                </tr> 
            </table>
            </LayoutTemplate>

            <ItemTemplate>
                <tr class="TableClassO" runat="server" onmouseover="this.style.backgroundColor='#838383'" onmouseout="this.style.backgroundColor='#ffffff'" titel="Auswahl"> 
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label4" Text='<%# Eval("Nachname") %>' runat="server"  /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label3" Text='<%# Eval("Vorname") %>' runat="server" /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label5" Text='<%# Eval("Telefonnummer") %>' runat="server"  /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="abteilung" CommandArgument='<%# Container.DataItemIndex %>' ID="Label7" Text='<%# Eval("Abteilung") %>' runat="server"  /></td>
                 <td align="left"><asp:ImageButton Width="15" Height="15" CssClass="MyLink" CommandName="mailto"  CommandArgument='<%# Container.DataItemIndex %>' ID="Label8" ImageUrl="~/App_Theme/Email.ico" runat="server" />

                 <asp:LinkButton  CssClass="MyLink"  CommandName="mailto" CommandArgument='<%# Container.DataItemIndex %>' ID="Label2" Text='<%# Eval("eMail") %>' runat="server" ToolTip="Öffnet Outlook" /></td>
                 <td align="left"><asp:Label ID="Label6" Text='<%# Eval("GUID") %>' runat="server" Visible="False" /></td>
            </tr>
            </ItemTemplate>

            <AlternatingItemTemplate>
                <tr class="TableClassO" runat="server" style="background-color:#E5EDF5;" onmouseover="this.style.backgroundColor='#838383'" onmouseout="this.style.backgroundColor='#E5EDF5'" titel="Auswahl"> 
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label4" Text='<%# Eval("Nachname") %>' runat="server"  /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label3" Text='<%# Eval("Vorname") %>' runat="server" /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label5" Text='<%# Eval("Telefonnummer") %>' runat="server"  /></td>
                 <td align="left"><asp:LinkButton  CssClass="MyLink"  CommandName="abteilung" CommandArgument='<%# Container.DataItemIndex %>' ID="Label7" Text='<%# Eval("Abteilung") %>' runat="server"  /></td>
                 <td align="left"><asp:ImageButton Width="15" Height="15" CssClass="MyLink" CommandName="mailto"  CommandArgument='<%# Container.DataItemIndex %>' ID="Label8" ImageUrl="~/App_Theme/Email.ico" runat="server" />

                 <asp:LinkButton  CssClass="MyLink"  CommandName="mailto" CommandArgument='<%# Container.DataItemIndex %>' ID="Label2" Text='<%# Eval("eMail") %>' runat="server" ToolTip="Öffnet Outlook" /></td>
                 <td align="left"><asp:Label ID="Label6" Text='<%# Eval("GUID") %>' runat="server" Visible="False" /></td>
            </tr>
            </AlternatingItemTemplate>

            <EmptyDataTemplate>
                 <div><h4>Es wurden keine Einträge gefunden</h4></div>
            </EmptyDataTemplate>

        </asp:ListView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:28:03+00:00Added an answer on June 13, 2026 at 8:28 am

    Yes you can like

    <tr class="TableClassO" runat="server" 
      onmouseover="this.style.backgroundColor='#838383'; this.style.color='some-color';" 
      onmouseout="this.style.backgroundColor='#ffffff'; this.style.color='some-other-color'" titel="Auswahl"> 
    

    for font color you can use this.style.color and for font-size this.style.fontSize

    but it will easy if you create a css-rule class for :hover like

    tr.TableClassO:hover { your_css_rule_here ;} 
    // It will run when mouse over on tr, then you dont need to use js events.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In WPF, I know I can use ListView.ScrollIntoView to scroll a particular item into
I want to use ListView on earlier versions of Android within an AppWidget. RagnarRs
i want to use the listview flicker"less" control found here Link directly in my
I want to use my own image of arrow for items in listview. Where
I want some of the goodies in a ListView, like being able to use
I use below code to update listview. setListAdapter(MyAdapter); MyAdapter.notifyDataSetChanged(); getListView().setEmptyView(empty); But each time update,
i want to create horizontal list with these uielements in wpf.I already use listview
I want to set an background to my listview that have different size (depending
I want to disable items in a ListView . First, I tried to use
Im about to make a android app and would like to use In-App-purchase in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.