You can use Border Style to highlight the button
HTML
<div>
<asp:DataList runat="server" ID="dlContacts">
<HeaderTemplate>
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
Country
</th>
<th>
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%# Eval("Id") %>
</td>
<td>
<%# Eval("Name") %>
</td>
<td>
<%# Eval("Country") %>
</td>
<td>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/transfer.png"
OnClick="ImageButton1_Click" />
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:DataList>
</div>
Namespace
using System.Data;
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Country",typeof(string)) });
dt.Rows.Add(1, "John Hammond", "United States");
dt.Rows.Add(2, "Mudassar Khan", "India");
dt.Rows.Add(3, "Suzanne Mathews", "France");
dt.Rows.Add(4, "Robert Schidner", "Russia");
dlContacts.DataSource = dt;
dlContacts.DataBind();
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
foreach (DataListItem item in dlContacts.Items)
{
(item.FindControl("ImageButton1") as ImageButton).BorderStyle = BorderStyle.None;
}
ImageButton img = sender as ImageButton;
img.BorderStyle = BorderStyle.Solid;
img.BorderWidth = 2;
img.BorderColor = System.Drawing.Color.Red;
}
Screenshot

Highlighted ImageButton
