473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Button Click Event Fires Erratically?

Hi all,

I have an <asp:button> inside an <asp:table> and I am finding that the
button click event doesn't fire at all! I have added the button to the
initialize component event, and the table.

The event fires when I change the access modifier to Protected, from
Private, but then it fires only every so often, and there is no pattern.

Can anybody tell me what is happening, why and what I need to do?

Thanks
Nov 18 '05 #1
1 1313
Your method must be protected if you want it to work. Keep in mind that
there are two separate classes that are built and compiled here: the code
behind is one class, and another class is dynamically built for your aspx
page. So, if you declare your handler as private, then the new class that is
generated is unable to access that method. You must implement it as
protected.

As for it firing erratically, I would hook up a debugger and step your way
through it to see what code path it is taking and why it isn't hitting what
you want it to.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Big_Stu" <acedev@remove_spam_hotmail.com> wrote in message
news:3f******@212.67.96.135...
Hi all,

I have an <asp:button> inside an <asp:table> and I am finding that the
button click event doesn't fire at all! I have added the button to the
initialize component event, and the table.

The event fires when I change the access modifier to Protected, from
Private, but then it fires only every so often, and there is no pattern.

Can anybody tell me what is happening, why and what I need to do?

Thanks

Nov 18 '05 #2

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

Similar topics

2
by: Vinita Sharma | last post by:
Hi All, I have a strange problem. I have 2 text boxes and a button in my form. There is a function called on onchange event of the first text box. There is another function called on onclick...
6
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new...
4
by: John Smith Jr. | last post by:
I have a very strange problem, I am dynamically creating buttons and events, when page loads the first click works fine, every click there after the event only fires every other click. I made a...
8
by: Lee | last post by:
Hi,I'm trying to have a button that fires a click event only once. What is the best way to do so that after the first button click, any the following clicks will be ignored.
4
by: Mark Lingen | last post by:
I've found a problem with postback event handling and webcontrol buttons. Try out the following code in an ASP.Net project and you will see. Create a web project in VB.Net and drop this code...
24
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog...
6
by: Joseph Geretz | last post by:
I'm porting a C# Outlook Addin originally engineered as a COM Addin over to use VSTO. I've gotten this to the point where my VSTO Addin installs its Menu items and Toolbar buttons when Outlook...
14
by: teddysnips | last post by:
WINDOWS FORMS I've a form that has a textbox that allows the user to enter a string. On the LostFocus event, the textbox formats the string into a preferred format. However, if the user...
2
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.