Home > ASP.Net > Highlight Row on MouseOver in Repeater Control

Highlight Row on MouseOver in Repeater Control


try this example to Highlight Row on MouseOver in Repeater or DataList Control

<%@ Page Language="vb" Src="HighlightRepeater.aspx.vb" Inherits="HighlightRepeater"%>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <title>Highlight Repeater Row</title>
 <table width="50%">
     <td bgcolor="black" align="center"><font color="white"><b>Customer Data</b></font></td>
 <form id="Form1" method="post" runat="server">
  <asp:Repeater ID="Repeater1" Runat="server">
     <table width="50%" cellspacing="0" cellpadding="0">
         <td bgcolor="black" align="left"><font color="white"><b>Customer ID</b></font></td>
         <td bgcolor="black" align="left"><font color="white"><b>Company Name</b></font></td>
         <td bgcolor="black" align="left"><font color="white"><b>Contact Name</b></font></td>
       <a href="ShowCust.aspx?id=<%# Container.DataItem("CustomerID") %>">
       <tr style="cursor:hand" onmouseover="style.backgroundColor='LightBlue'" onmouseout="style.backgroundColor=''">
         <td align="left"><%# Container.DataItem("CustomerID") %></td>
         <td align="left"><%# Container.DataItem("CompanyName") %></td>
         <td align="left"><%# Container.DataItem("ContactName") %></td>

Hope this helps

Good Luck

Categories: ASP.Net
  1. Reda Abbas
    October 9, 2009 at 7:44 pm

    Eih ya 3am el Kalam el gamed dah.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: