Greetings,
Let's say that we are creating a form in design view in Visual Studio. We place a button on the form and then double-click the button to automatically generate an event handler for the click of the button. This takes us directly to the code view of the handler where we write our code, save the solution, and then run it to test.
Ok, now, initially, we forgot to rename the button's name, the variable name not the text within the button.
However, the code within the project is now saved as an event handler for button1 instead of an actual adequate name. We can rename the button within the Properties tab however, the event handler does not change.
I am assuming that VS creates some sort of symbolic link or pointer from the new button name to the one that already exists within the code for the even handler.
How can we change this? Even if we delete the original button, create a new one and rename it before putting our code in the event handler, the old button's even handler is still present in the code, and obviously somewhere else in the project.
What's the easiest way to clear this up?