Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent Class - Replace All?
Message
From
17/07/2008 09:27:04
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01331349
Message ID:
01331950
Views:
11
>>Richard,
>>
>>>>>I had a utility that did this in FoxPro (the VMP Hack utility). Is there one for .NET?
>>>>>
>>>>>I have forms that are full of controls that are based on a given parent class. I want to do a "replace all" to change the parent class of all of the controls that are using another given parent class.
>>>>
>>>>Try to use refactor from IDE.
>>>
>>>I am new to .NET, so I am probably missing something obvious.
>>>
>>>How do I refactor controls on a form?
>>
>>Control "F" gives you a find and replace but I am not sure that addressess your issue. The controls are probably defined in the partial class className.designer.cs if you are using C#. If the controls are base controls like label or textbox and you want to change them to say myTextbox or myLabel then you need to add the assembly reference where they come from and then change the control definitions to be "myTextbox" or "myLabel"
>>
>>Again, not sure if that is what you are asking, but trying to give you something. Refactor is primarily for moving parts of code to a new method for instance and is available from the right click menu if you highlight a block of code.
>>Tim
>
>That did the trick. I opened the "className.designer.cs" and just did a plain old find-and-replace ( after setting up my assembly reference). It worked perfectly.
>
>Thanks!
>
>Richard

Your welcome. Many of us including me came from Fox so we understand the learning curve.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform