I tried to access a ListView function from client side by using onclick in <a href>
tag. But it resulted in an error like this:
No overload for 'ListView1_ItemEditing' matches delegate 'System.EventHandler'
<a href="#" onServerClick="ListView1_ItemEditing" runat="server">
<img src="../admin/images/editbtn.png"alt="editbtn" class="editimgbtn" id="editdelete"/>
</a>
Code behind:
protected void ListView1_ItemEditing(object sender, ListViewEditEventArgs e)
{
//contents
}
I know I can access this by using a LinkButton
, but I need to use <a href>
instead of that, and the tag is set inside a ListView
. So how can I solve this issue?