HTML :
<asp:LinkButton ID="lnk_productImage" runat="server" Text="select"
OnClick="viewProductImage('<%#DataBinder.Eval(Container.DataItem,"Id") %>')"
>
</asp:LinkButton>
CodeBehind:
protected void viewProductImage(object sender, EventArgs e, int id)
{
//Load Product Image
}
I see you're using a repeater, so you probably could use this code:
In your repeater template:
Then handle the repeater's ItemCommand event:
Use CommandArgument property of linkbutton to pass parameters.
CommandArgument property:
Gets or sets an optional argument passed to the Command event handler along with the associated command name property.
LinkButton Members