Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What happens after a rename?
Message
 
To
14/10/2003 10:04:53
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00838395
Message ID:
00838585
Views:
18
>Ok, it now works. In order to rename the class, I had to "Go to definition" and change it in the code.
>
>Now, there are two things I don't understand. And, I guess many have probably sent suggestions to Microsoft. The first one is why changing the aspx file not synchronized with all that. The second is why we cannot rename from right click on the class and have to go in the code.


Well, for some files, you don't necessarily want the filename and the class name the same. You may want the page to be call foo.aspx, or something easy for linking and you want the class name that is more descriptive of the functionality.

As for right clicking and changing the name, I believe the designer uses the class name to instantiate everything for the design view, so if you were to rename it that designer wouldn't know what it was accessing. That is why the only way is to change it in the code-behind, but I may be wrong on that.

Morgan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform