Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Will - 13 Mar 2008 17:09 GMT
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?

Signature

-Will

Peter Bromberg [C# MVP] - 13 Mar 2008 17:41 GMT
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

> I have an image "button" which causes a postback.
>
[quoted text clipped - 7 lines]
> Is there any easy way to detect that the image button has been double-cliked
> and posted back twice?
Will - 13 Mar 2008 17:56 GMT
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
Signature

-Will

> 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
[quoted text clipped - 16 lines]
> > Is there any easy way to detect that the image button has been double-cliked
> > and posted back twice?
Jeff Dillon - 13 Mar 2008 18:36 GMT
Disable the button client side onclick?

> Thanks Peter. That's the solution I planned on going with.
>
[quoted text clipped - 28 lines]
>> > double-cliked
>> > and posted back twice?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.