Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Handle Double-click on <Input type="image">

Reply
Thread Tools

Handle Double-click on <Input type="image">

 
 
Will
Guest
Posts: n/a
 
      03-13-2008
I have an image "button" which causes a postback.

I handle the "click" with

If Request.Form("btnBU7WD6_Submit.X") > 0 Then...

this works great. However, when a user double-clicks the image button the
Page_Load (postback) is processed twice. This is a problem.

Is there any easy way to detect that the image button has been double-cliked
and posted back twice?

--
-Will
 
Reply With Quote
 
 
 
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      03-13-2008
Try creating a boolean Session Item at thee end of the click handler method
, and check for its presence before handling any subsequent clicks. If the
session item is not null at the beginning of the click handler method body,
that means it was already clicked.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net


"Will" wrote:

> I have an image "button" which causes a postback.
>
> I handle the "click" with
>
> If Request.Form("btnBU7WD6_Submit.X") > 0 Then...
>
> this works great. However, when a user double-clicks the image button the
> Page_Load (postback) is processed twice. This is a problem.
>
> Is there any easy way to detect that the image button has been double-cliked
> and posted back twice?
>
> --
> -Will

 
Reply With Quote
 
 
 
 
Will
Guest
Posts: n/a
 
      03-13-2008
Thanks Peter. That's the solution I planned on going with.

I was hoping there was a way to detect it in the Postback, but I don't see
anything.

Thanks
--
-Will


"Peter Bromberg [C# MVP]" wrote:

> Try creating a boolean Session Item at thee end of the click handler method
> , and check for its presence before handling any subsequent clicks. If the
> session item is not null at the beginning of the click handler method body,
> that means it was already clicked.
> -- Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short Urls & more: http://ittyurl.net
>
>
> "Will" wrote:
>
> > I have an image "button" which causes a postback.
> >
> > I handle the "click" with
> >
> > If Request.Form("btnBU7WD6_Submit.X") > 0 Then...
> >
> > this works great. However, when a user double-clicks the image button the
> > Page_Load (postback) is processed twice. This is a problem.
> >
> > Is there any easy way to detect that the image button has been double-cliked
> > and posted back twice?
> >
> > --
> > -Will

 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      03-13-2008
Disable the button client side onclick?

"Will" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Peter. That's the solution I planned on going with.
>
> I was hoping there was a way to detect it in the Postback, but I don't see
> anything.
>
> Thanks
> --
> -Will
>
>
> "Peter Bromberg [C# MVP]" wrote:
>
>> Try creating a boolean Session Item at thee end of the click handler
>> method
>> , and check for its presence before handling any subsequent clicks. If
>> the
>> session item is not null at the beginning of the click handler method
>> body,
>> that means it was already clicked.
>> -- Peter
>> Site: http://www.eggheadcafe.com
>> UnBlog: http://petesbloggerama.blogspot.com
>> Short Urls & more: http://ittyurl.net
>>
>>
>> "Will" wrote:
>>
>> > I have an image "button" which causes a postback.
>> >
>> > I handle the "click" with
>> >
>> > If Request.Form("btnBU7WD6_Submit.X") > 0 Then...
>> >
>> > this works great. However, when a user double-clicks the image button
>> > the
>> > Page_Load (postback) is processed twice. This is a problem.
>> >
>> > Is there any easy way to detect that the image button has been
>> > double-cliked
>> > and posted back twice?
>> >
>> > --
>> > -Will



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Package to handle table text render (handle space or tab betweenthe columns) ? =?ISO-8859-1?Q?KLEIN_St=E9phane?= Python 3 10-06-2006 08:46 AM
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. jdlwright@shaw.ca ASP .Net 2 05-31-2005 05:42 PM
how to handle command line output(not terminal handle) Leon Python 2 11-04-2004 05:16 AM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM
Re: FileDialog window handle Jay B. Harlow [MVP - Outlook] ASP .Net 5 09-03-2003 09:58 AM



Advertisments