Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Renaming controls without messing up code?
Message
 
To
27/03/2008 23:44:57
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01306371
Message ID:
01306456
Views:
4
>On a Windows Forms, how can I rename a control (using the Properties window in the IDE) knowing that there may be many event handlers and other references to the old name in other places in my codes?
>
>If you rename it immediately after placing it, you're ok, but what if you have already coded against it and then decide to rename it how do you fix all the references? Will it do it automatically or do I have to find all the places that need to be changed? Where all should I look?


Like Craig said use Refactor->Rename instead. The Refactor menu is very powerful. I especially like the feature where you can select a block of code and extract a method for it.

Keep in mind that the rename will not rename the event handler names but it will retain the link to the eventhandler.
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform