Solved

C# asp.net button control not working!

Posted on 2003-12-01
3
1,599 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now