Check this sample
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$("[id*=DataList1] table").live("mouseover", function () {
$(this).css("cursor", "pointer");
$("[id*=details]", this)[0].className = "ImageButton_hover";
});
$("[id*=DataList1] table").live("mouseout", function () {
$("[id*=details]", this)[0].className = "ImageButton";
});
</script>
<style type="text/css">
.ImageButton
{
border-radius: 2px;
background-image: url(/images/btn_2.png);
height: 15px;
font-size: 12px;
text-align: center;
width: 30px;
text-decoration: none;
background-color: Orange;
border: solid 1px green;
}
.ImageButton_hover
{
border-radius: 2px;
background-image: url(/images/btn_1.png);
height: 15px;
font-size: 12px;
text-align: center;
width: 30px;
text-decoration: none;
background-color: yellow;
border: solid 1px green;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:DataList ID="DataList1" runat="server" RepeatColumns="2">
<ItemTemplate>
<table border="1">
<tr>
<td>
<asp:LinkButton ID="details" runat="server" Text="Select" CssClass = "ImageButton"></asp:LinkButton>
</td>
<td style="width: 150px">
<b>Coupon: </b>
<asp:Label ID="lblCoupon" runat="server" Text='<%# Eval("Coupon") %>'></asp:Label>
</td>
<td style="width: 100px">
<b>Code: </b>
<asp:Label ID="lblCode" runat="server" Text='<%# Eval("Code") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</form>
</body>
</html>
private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[2] { new DataColumn("Coupon"), new DataColumn("Code") });
dt.Rows.Add("Shirt", 199);
dt.Rows.Add("Football", 020);
dt.Rows.Add("Shirt", 566);
dt.Rows.Add("Disc", 099);
dt.Rows.Add("Watch", 54);
dt.Rows.Add("Clock", 890);
return dt;
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataList1.DataSource = GetData() ;
DataList1.DataBind();
}
}