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

  • Home
  • SEARCH
  • 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 8339839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:59:33+00:00 2026-06-09T04:59:33+00:00

I have an ASP.NET Application and use a ListView . This ListView has rows

  • 0

I have an ASP.NET Application and use a ListView. This ListView has rows and columns. The columns are Firstname, Lastname, email etc… Every Control in this ListView is a LinkButton.

My Idea:

If the user moves the mouse over a LinkButton, I want them to see a different BackroundColor on that line.

For Example:

enter image description here

My Code:

aspx:

<body>
    <form id="form1" runat="server">
    <div class="header">
        <br />
        <table id="SuchTabelle" runat="server" border="0">

            <tr>
                <th><asp:Label ID="id_SearchUser" runat="server" Text="lblSearchUser"></asp:Label></th>
                <th><asp:TextBox ID="txtBenutzer" runat="server" Width="250px"></asp:TextBox></th>
                <th></th>
            </tr>
            <tr>
                <th><asp:Label ID="id_location" runat="server" Text="lblLocation"></asp:Label></th>
                <th><asp:DropDownList ID="dropWerk" runat="server" Width="250px" /></th>
                <th><asp:Button ID="Button2" runat="server" Text="Suchen" 
                                onclick="btnBenutzerSuchen_Click" Width="250" /></th>
            </tr>

        </table>

        <br />
        <br />
       <b>&nbsp;&nbsp;&nbsp; Info:</b> 
        <asp:Label ID="lbMeldung" runat="server" 
            Text="Geben Sie den Kontakt ein, nachdem gesucht werden soll..."></asp:Label>
        <br />
      <br />
      </div>

      <div class="bodyList">


        <asp:ListView runat="server" ID="myListView">

        <LayoutTemplate>
            <table id="UserTable" runat="server" border="0">
                <tr id="Tr1" style="background-color:#E5E5FE">
                    <th runat="server"><asp:LinkButton ID="lnkBenutzer" runat="server" >id_Benutzer</asp:LinkButton></th>
                    <th runat="server"><asp:LinkButton ID="lnkemail" runat="server" >id_Email</asp:LinkButton></th>
                    <th runat="server"><asp:LinkButton ID="lnkVorname" runat="server" >id_Vorname</asp:LinkButton></th>
                    <th runat="server"><asp:LinkButton ID="lnkNachname" runat="server" >id_Nachname</asp:LinkButton></th>
                    <th runat="server"><asp:LinkButton ID="lnkTelefon" runat="server" >id_Telefon</asp:LinkButton></th>
                </tr>
                <tr runat="server" id="ItemPlaceholder">
                </tr>
            </table>
        </LayoutTemplate>

        <ItemTemplate>

            <tr>    
                <td align="left" ><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label1" Text='<%# Eval("Benutzername") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label2" Text='<%# Eval("eMail") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label3" Text='<%# Eval("Vorname") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label4" Text='<%# Eval("Nachname") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label5" Text='<%# Eval("Telefonnummer") %>' runat="server" /></td>

              <td align="left"><asp:Label ID="Label6" Text='<%# Eval("GUID") %>' runat="server" Visible="False" /></td>

            </tr>

        </ItemTemplate>

        <AlternatingItemTemplate>

            <tr style="background-color:#EFEFEF"> 

                <td align="left" ><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label1" Text='<%# Eval("Benutzername") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label2" Text='<%# Eval("eMail") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label3" Text='<%# Eval("Vorname") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label4" Text='<%# Eval("Nachname") %>' runat="server" /></td>
                <td align="left"><asp:LinkButton CssClass="MyLink" OnCommand="Button1_Command" CommandName="Select" CommandArgument='<%# Container.DataItemIndex %>' ID="Label5" Text='<%# Eval("Telefonnummer") %>' runat="server" /></td>

                <td align="left"><asp:Label ID="Label6" Text='<%# Eval("GUID") %>' runat="server" Visible="False" /></td>

            </tr>

        </AlternatingItemTemplate>

        </asp:ListView>

        <br />
        <br />

    </div>

    </form>
</body>
  • 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-09T04:59:34+00:00Added an answer on June 9, 2026 at 4:59 am

    You can use CSS:

    <LayoutTemplate>
        <table id="UserTable" runat="server" class="myClass">
            <tr id="Tr1" class="myClass">
                <th id="Th1" runat="server">
                    <asp:LinkButton ID="lnkBenutzer" runat="server" Text="id_Benutzer" />
                </th>
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="lnkemail" runat="server" Text="id_Email" />
                </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lnkVorname" runat="server" Text="id_Vorname" />
                </th>
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="lnkNachname" runat="server" Text="id_Nachname" />
                </th>
                <th id="Th5" runat="server">
                    <asp:LinkButton ID="lnkTelefon" runat="server" Text="id_Telefon" />
                </th>
            </tr>
            <tr runat="server" id="ItemPlaceholder">
            </tr>
        </table>
    </LayoutTemplate> 
    

    and in *.css file:

    .myClass
    {
    
    }
    
    .myClass:hover
    {
    background-color: Green;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET Application and use a ListView . This ListView has a
I have an asp.net web application that use FormsAuthentication. Now, the application has a
I have ASP.NET webFroms application on my local, when i try to use this
We have a ASP .Net application whereby we use Log4Net to log details within
I use yui datatable in my asp.net application... I have a link button in
I am about to use linqtosql in my first asp.net mvc application. I have
ASP.NET application, VB or C# doesn't matter. I have Listview which databound to Dataset
I have a ASP.NET web application that use the same DataContextType to access several
We have an ASP.net application but some screens are deemed too slow to use
I have an ASP.Net application running under IIS 6. A simple page has two

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.