【问题标题】:can righ click on button that i use in GridView and open new tab可以右键单击我在 GridView 中使用的按钮并打开新选项卡
【发布时间】:2012-11-09 05:25:14
【问题描述】:

我在 GridView 中使用下面的代码来显示每一行信息,当用户单击此按钮(图像)时转到另一个页面。 现在我想这样做,当用户右键单击此按钮时,可以在新选项卡中打开页面

<asp:ButtonField ButtonType="Image" CommandName="Update" HeaderText="show" ImageUrl="~/Images/show.png" DataTextField="show" />

【问题讨论】:

    标签: asp.net


    【解决方案1】:

    使用超链接字段代替按钮字段。或者,如果您需要CommandName,您可以使用TemplateColumn 并使用LinkButton 控制。这将解决您的问题。

    【讨论】:

    • 我使用TemplatefireldLinkButton,但是当我右键单击它时,只会看到Bookmark this LinkCopy Link LocationInspect Element
    猜你喜欢
    • 1970-01-01
    • 2013-02-20
    • 1970-01-01
    • 2020-01-16
    • 1970-01-01
    • 1970-01-01
    • 2016-03-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多