473,657 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to click a button twice .. Bug?

Hello All,

I have an asp:button and I have tied an eventhandler to this button's click
event which means that the eventhandler should be executed everytime I click
the button. But to my frustration, the eventhandler does not get executed
everytime I click the button. I have to click the button twice at times to
make sure that the event handler is being called. Why is the control behaving
in this way? This problem is not specific for a page but this is persistent
in other pages where I end up clicking the button twice which is frustrating.

I tried debugging this behavior by putting a breakpoint inside the
eventhandler. When the eventhandler is called, the flow reaches the
breakpoint inside the event handler but in case where I need to click the
button twice, the execution does not reach the breakpoint though it goes into
page_load method and stops there. Why is this happening? Am I doing anything
wrong?

Thanks!!!
Nov 19 '05 #1
0 1549

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1378
by: wendy | last post by:
I created com add-in for word2003, excel2003 and powerpoint2003, basically, i added 4 button in toobar and on_click, i apply some bussiness logic. all works in excel2003 and powerpoint 2003, but in word2003, the button event has been tiggered twice. After i click, it run the code inside the button click, then run again. so annoying. code attached below,Any help and suggestion will be great appriciated Wendy
2
4014
by: Oney | last post by:
I want to open a popup window when user click the web server button control When user click the button, only OnClik="OpenWindow(12)" is sent but no event happend no popup opened.After that, user click again popup window is open. So user must click twice! So I must raise event twice. How can I do that or do you advice any solution? Thanks!
5
3484
by: Jon Booth | last post by:
Hi All, I'm trying to create a button that once clicked will disable itself (so as not to be clicked twice) I have the following in my cs Button1.Attributes.Add("onClick","return document.Form1.Button1.disabled=true;"); It disables the button but does not perform the post back. What am I doing wrong?
3
2514
by: Wang | last post by:
Here is the code for a webcontrol, quite simple: ------------------------------------------------------------------------------------------------------------- <%@ Control Language="c#" AutoEventWireup="false" Codebehind="WebUserControl1.ascx.cs" Inherits="WebApplication23.WebUserControl1" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> <STYLE> ..ModuleContent P { FONT-SIZE: x-small; FONT-FAMILY: Arial, Verdana, Helvetica }...
3
8787
by: Imran Aziz | last post by:
Hello All, I have a search text and button that post data and my button handler filters the repeater control. However when the button is clicked the first time. The page_load event is being called twice, once with postback true, and second time without postback. This only happens for this button. How can I sort out this issue, any clues what to look for to get this sorted please. <p>Search Bookmarks: <asp:TextBox ID="txtSearch"...
0
2131
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I'm having trouble working with a Summary Validation control. I need to click my submit button twice for the Summary to display when validation errors occur on the page. Background: My page contains a radio control which the user must answer to finish the page entry. If user hits submit button without selecting item from control, summary validation error displays. In this case one click is sufficient. Once the user selects choice on...
2
2019
by: Severus Snape | last post by:
I can display and hide 1 object at a time, but haven't seen it done on multiple objects simultaneously. I have four (or more) tables on a page that start off hidden, and I want to toggle their visibility -- but have only one table visible at any time. If I click button #1, table #1 should toggle visibility and all other tables should remain hidden. If table #1 is visible and I click button #3, table #1 becomes hidden and table #3 becomes...
8
5917
by: Learner | last post by:
Hello, I converted a VS 2003 project to VS 2005. It works perfectly alright in VS 2003 but when I try running in VS 2005 I got strange thing going on. The code (my button click event ) runs twice? Has any one run into this kind of situation before please help. Am I missing some thing here? or do I need to set an option here? Thanks, -L
2
3240
by: =?Utf-8?B?SGV6YWw=?= | last post by:
Hi, I am trying to add a new record to a table but everytime I click the button, somehow it saves the record twice... I've created a stored procedure to insert records into a table and I called that procedure in the code that I attached to a button click. Here is the event handler code which is created automatically: this.AddCustomer.Click += new System.EventHandler(this.AddCustomer_Click); I checked the stored procedure and the code...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.