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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.