468,247 Members | 1,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Using the Press and Release event for a Button

Hi there,

I would like to use a asp:Button to command a blind: when I press the Up
button, the blind is opening, when I release the button, the blind stops.

So I would like to send two commands to the Web server, one when I start
pressing the button, the other when I release it.

Any idea ?

Best regards

Oct 17 '08 #1
3 1112
"Oriane" <or****@noemail.noemailwrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
So I would like to send two commands to the Web server, one when I start
pressing the button, the other when I release it.
You'll need use the JavaScript onMouseDown and onMouseUp events.

However, if you want these events to communicate with the server, you'l have
to either cause a postback or use AJAX.

Alternatively, you may be achieve the same or similar effect with
Silverlight...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 17 '08 #2
Hi Mark,
"Mark Rae [MVP]" <ma**@markNOSPAMrae.neta écrit dans le message de
news:OW**************@TK2MSFTNGP06.phx.gbl...
"Oriane" <or****@noemail.noemailwrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
>So I would like to send two commands to the Web server, one when I start
pressing the button, the other when I release it.

You'll need use the JavaScript onMouseDown and onMouseUp events.

However, if you want these events to communicate with the server, you'l
have to either cause a postback or use AJAX.
I use Ajax, but I can't see how causing a postback and call the server-side
method...

Thank you !

Oct 17 '08 #3
Finally, I've used static PageMethods.

Oriane
Oct 21 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

52 posts views Thread by Dick Moores | last post: by
121 posts views Thread by typingcat | last post: by
6 posts views Thread by guoqi zheng | last post: by
2 posts views Thread by many_years_after | last post: by
1 post views Thread by =?Utf-8?B?QXNhZg==?= | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.