【发布时间】:2018-02-03 21:20:10
【问题描述】:
当我用鼠标右键按下我的 ImageButton 控件时,我希望有一个特定的事件处理程序可以工作。我怎样才能做到这一点?我使用 asp.net。
【问题讨论】:
标签: asp.net event-handling right-click
当我用鼠标右键按下我的 ImageButton 控件时,我希望有一个特定的事件处理程序可以工作。我怎样才能做到这一点?我使用 asp.net。
【问题讨论】:
标签: asp.net event-handling right-click
您必须使用客户端技术来捕获它,例如 js/Jquery。类似的东西
<script type="text/javascript"> $(function () { $("#ImageButton").mousedown(function (e) {
if (e.which == "3") {
// Do magic.
} }) }); </script>
【讨论】: