Solved

dafsd

Posted on 2015-02-12
2
38 Views
Last Modified: 2015-02-13
I'm writing my first  C#  program in Microsoft Visual C# 2010.  From "New Project" window I select "Visual C#", Windows Forms Application.  I create two buttons.  When I double-click first button, it opens up source code window.  I write one line of source code which also propagates to button 2's source code.  

Why ?

I want both buttons to be independent of each other.  Adding code for button 1 shouldn't appear in button 2's source code.
0
Comment
Question by:naseeam
2 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 500 total points
ID: 40606949
Are you expecting a separate source file for each button? Usually, there's just one source file per form and the code for each widget, button, etc will appear in that source file, regardless of which control you click on to visit the source file. Code that you add specific for a button should not be getting duplicated to the other button.

You want to post a code sample to show what you're seeing?
0
 

Author Closing Comment

by:naseeam
ID: 40607903
Thank you!
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

Suggested Solutions

Title # Comments Views Activity
MVC5 Dataformat String for Phone not working 3 26
What .NET URL re-routing tool did I use? 2 37
Error in JQuery 5 39
Device Location 4 19
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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