• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1611
  • Last Modified:

C# asp.net button control not working!

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
yuen_wc
Asked:
yuen_wc
1 Solution
 
mvannataCommented:
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
 
jj819430Commented:
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
 
pun1sherCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now