Solved

C# asp.net button control not working!

Posted on 2003-12-01
3
1,604 Views
Last Modified: 2007-12-19
Hi, I'm using asp.net and c# and on this particular web form I have a button control.  I added a callback function to the button by double-clicking the control and some code in the code-behind.  For some unknown reason, when I click on the button, nothing happens.  I tried debugging it by inserting a break-point inside the call-back and stepping thru but it never gets to the call-back.  Any ideas?
0
Comment
Question by:yuen_wc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
mvannata earned 50 total points
ID: 9850482
Double-click your button in design time and see if it creates a new event procedure.  If it has then your button click callback has gotten disassocitated from you button object and will have to get re-associated in the InitializeComponent() function.  Make sure you delete any new orphaned code that is created.

0
 
LVL 7

Expert Comment

by:jj819430
ID: 9851626
post the relevant call

Is this button in a datagrid?

Post the code of the Form
Post the code behind of the function you want to run
0
 
LVL 1

Expert Comment

by:pun1sher
ID: 9907820
The event may be nulled by the postback of the webform I have had this problem for a button in a datagrid... , are you checking for the Page.IsPostback property?
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question