Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 11, 2007 09:38 AM by chrisoftoday
May 09, 2007 12:47 PM|LINK
Hi - is there anyway of determining in a postback in asp.net (vb) if the right mouse button has been clicked, as opposed to just a mouse click?
May 09, 2007 12:56 PM|LINK
Can the right click be captured, set a variable on the page somewhere (eg. text box), which then causes the normal postback which would occur if the left button was pressed, which can be captured by the asp.net - asp.net reads the textbox variable, and can
determine it was a right click?
May 10, 2007 10:53 AM|LINK
For example, if you wanted to capture the right click in a text box...
document.getElementById(id).value = "right click";
Obviously isn't a properly thought through solution coz I guess you wouldn't want to put the value in the same text box but I hope that gives you some ideas.
May 10, 2007 01:28 PM|LINK
It does - thank you very much.
Is there a way to stop the context menu coming up (I'm using an update panel, and it posts back, but still shows the menu).
May 11, 2007 09:35 AM|LINK
yourTextbox.Attributes.Add("oncontextmenu", "RightClickJSFunction(this.id); return false;")
May 11, 2007 09:38 AM|LINK