"The name of an event handler will NEVER change when you change the Name of a control. What you should be doing is changing the Name IMMEDIATELY after adding the control to the form, BEFORE adding any event handlers. That way, when you do add an event handler, it will contain the proper name of the control."
Thanks for the response! I used to program professionally, the last language being VB.net. I'm getting back into after a number of years away so I'm rusty. I don't remember seeing this behavior with VB.net. I'm not creating my own methods or event handlers. This issue is just with controls from the tool box, specifically button controls. I was experimenting today with this issue by varying the way I put a button on a form and opening the code window at different times, before I renamed a control and after. It does, sometimes, change the default click event name to the name I gave it. Other times it shows the generic/default name. I did rename the button immediately after putting it on the form and it still is unpredictable. Sometimes when I put the button on the form and double click it for the code window, it doesn't show any reference anywhere to that button with any name. At one point I put a button on the form, renamed it and saw:
private void button1_Click(......etc.). I added another button, renamed it uniquely, and the code window showed:
private void button1_Click(......etc.), exactly the same name. I put different code in each one that referenced the control by the name I gave it. When I ran it, it was working and distinguished between the two identically named click events. Not that it is random, but it seems like it is hit or miss when it renames the click event and when it doesn't. I understand what you said about being by design, but should it really be this unpredictable? I don't remember seeing this in the past with VB.net. I am assuming this would be more .net ide behavior as opposed to C# or VB specific.
The problem is after putting 10 buttons on the form and then going to the code window, if it is unpredictably changing some of the names and not others, how does one know which private void button1_Click(......etc.) is referencing which button I put on the form. I know this did not happen with VB.net. By the way, this is an older version of .net and C#. I believe it is .net framework 1.1 and MS development environment 2003 version 7.1.3088.
Thanks!