0

How can i implement Mouse scroll click(Middle Button) event in asp.net and c#?

I also referred in the MouseWheel Event. But it's does not helps to me.

Because there have

Mouse events occur in the following order:

  • MouseEnter
  • MouseMove
  • MouseHover / MouseDown / MouseWheel
  • MouseUp
  • MouseLeave

and also tried some codes from Stack Overflow

Jquery alert when middle mouse button clicked?

But it's implemented in java script(i don't know it is worked well on Firefox browser). I want to implement that using asp.net c#. Is it possible? if yes, please let me know.

Thanks .

Community
  • 1
  • 1
  • You need javascript to trigger a postback. – deostroll Apr 28 '14 at 08:38
  • @deostroll I don't want any javascript coding, Please see my question header . –  Apr 28 '14 at 08:40
  • You can inspect another server control - say an asp.net link button. If the button is clicked, it actually executes a javascript that submits the web form. This is how webforms is designed. – deostroll Apr 28 '14 at 08:45
  • cannot work without JavaScript. Directly or indirectly you will have to provide JavaScript to the browser, as browser do not understand any other language. – Manish Dalal Apr 29 '14 at 10:12

1 Answers1

0
  1. Use JavaScript to detect the middle click
  2. Store the required page state in respective variables
  3. Store the mouse click info in some variable on page
  4. Cause the page to postback
  5. On Server, read the value of the variable in Step 3, if exist, raise the MiddleClick event
  6. In the middleClick event handler, do the needful.

The client side JavaScript and Server side event mechanism can be converted into a framework of your own so that you can have the middle click functionality at various places.

Manish Dalal
  • 1,768
  • 1
  • 10
  • 14