Is it possible to show asp:ImageButton as HTML?
Below is piece of code;
e.Row.Cells[0].Text = "<img src='Images/desc.gif' >";
which i need to replace with asp:imagebutton due to its postbackURL property (as it supports navigation)
Hence i have replaced my code as ;
e.Row.Cells[0].Text = "<asp:ImageButton id=imgtempasc runat=server ImageUrl=~/Images/tempasc.gif PostBackUrl=~/OT_Overview_Home.aspx >";
to show image button instead of image (as in code # 1) but Code # 2 doesn’t work
thanks!
I really don’t understand why you cannot use a
HyperLinkif you are modifying the Cell in your code? Especially if all you are doing is sending the user to another URL.If you are simply sending the user from one URL to another, then will this not work
If you require form data to be posted from your existing page to another page, then you will need to do what Andreas Niedermair has suggested and dynamically add the control to the GridView