>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement