• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:


I have a user control, say UC, with splitter control that divides the form like |--.
The right bottom portion loads controls based on the user selections on the left side.

I have attached a Application.AddMessageFilter that captures the MOUSEMOVE messages in UC constructor.

While the user is acitve on UC my application keeps renewing logout time.
If the mouse stops moving on UC then it logs the user out after 30 secs of inactivity...

When I host the above user control UC inside a Win Form everything works fine. But when I host the same UC inside an internet explorer using OBJECT tag, MOUSEMOVE is not working correctly:: Eventhough I am moving the mouse, it fails to renew the user logout time but instead acts like it is not seeing the MOUSEMOVE events...and simply logs out the user.

HOW TO FIX this??


  • 3
  • 2
1 Solution
John ClaesSenior .Net Consultant & Technical AnalistCommented:

because everything is done at the codebehind the WinForm will work correcly because OnMouseMove will call the presenter (codebehind) and the mouse move is "seen" and "processed"

because in an ASP the CodeBehind is ServerSide and so for every CodeBehind Execution an Server-Call must be done.
On every mouse move you should then send the call towards the server and this will issue a real hugh bunch off calls.
That's why the MOUSEMOVE is not working linked to CodeBehind Calls

Poor beggar.
YetAnotherCoderAuthor Commented:
Hi Poor beggar,

What is the best way to get it working then. Is there a JavaScript alternative that I can use when the mouse is over user control, UC, and call the control function via the java script. How effective will it be? Atleast it will handled locally and not at the server?
John ClaesSenior .Net Consultant & Technical AnalistCommented:
you can indeed use the Javascripts to catch the mouse moves.
Everything will be kept Client Side. because JavaScript runs clientside.

But when needed you can call a action on the screen that will fire a PostBack handling towards the server.

poor beggar
YetAnotherCoderAuthor Commented:
Hi poor beggar,

As I have another discussion on another thread
I have tried using JavaScript OnMouseMove event on a DIV tag to call the function inside the user control. It works until I display a popup dialog originated inside the control. Once the dialog is displayed and closed, the OnMouseMove event does not work anymore until the mouse is taken off of the control and bring it back OR until a right click on the control. How to avoid moving mouse out of the control or right click and make it work??

Thanks for any ideas... You can add to that thread...
John ClaesSenior .Net Consultant & Technical AnalistCommented:
I've done that.
is this question closed?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now