Solved

C# asp.net button control not working!

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

12 Experts available now in Live!

Get 1:1 Help Now