I use below code in GridView for show each row information and when user click on this button(image) go to another page. now i want to do it that when user right click on this button can open page in new tab
我在GridView中使用下面的代码来显示每一行信息,当用户点击此按钮(图像)时,转到另一页面。现在我想这样做,当用户右键单击此按钮可以在新选项卡中打开页面
<asp:ButtonField ButtonType="Image" CommandName="Update" HeaderText="show" ImageUrl="~/Images/show.png" DataTextField="show" />
1 个解决方案
#1
0
In place of button field use hyperlink field. OR, if you need CommandName
, you can use TemplateColumn
and use LinkButton
control. That will solve your problem.
代替按钮字段使用超链接字段。或者,如果需要CommandName,可以使用TemplateColumn并使用LinkButton控件。这将解决您的问题。
#1
0
In place of button field use hyperlink field. OR, if you need CommandName
, you can use TemplateColumn
and use LinkButton
control. That will solve your problem.
代替按钮字段使用超链接字段。或者,如果需要CommandName,可以使用TemplateColumn并使用LinkButton控件。这将解决您的问题。