Gustavo

Gustavo

  • NA
  • 1.3k
  • 455.3k

Rename a button in VS 2008 C#

Feb 25 2010 8:09 PM

Hello:
 
I named a button with the default of button3. I clicked the button and added some code. I then renamed the button to 'buttonExcel' in the Property window. It left the 'button3' code without renameing it.
 
How  can I rename a button and have it be changed everywhere in the application/project? Without cut/past the code.
 
Also I have some code that does not do anything. How can I remove all that are empty? (Like code below)
 
private void buttonVBasic_Click(object sender, EventArgs e)
{
}
 
If I just delete the code, it gives me errors.

Answers (3)