I have GridView(id: gv_test) with two columns:
itemId
ImageButton (id: ImageBTN)
<asp:ImageButton ID="ImageBTN" Width="34px" Height="34px" ImageUrl="~/bla/bla.png" OnClick="ImageBTN_Click" runat="server" CommandName="Select" Text="PopUp"> </asp:ImageButton>
As you see, i tried somthing with OnRowCommand and with OnRowDataBound by using CommandName.. but without success, even not close.
The itemId get his value from sql table.
what i’m want to do – when the user click on the ImageButton – will open a popup with the link: test.aspx?id=itemId.
How i can to do that by c# (OnClick event).
This should help. I did something similar and this code was great help.
http://www.codeproject.com/KB/webforms/gridview_popup.aspx