Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Common code behind file
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00770311
Message ID:
00770976
Vues:
10
I agree that it isn't a good idea to share the same backend file. .NET makes it very easy to inherit from the same base class.

>>Rick,
>>
>>Have you successfully done this in VS.NET? When I have tried this before in VS.NET, I get all kinds of messages and the project won't compile.
>
>No other than that accident. I seem to remember the code compiled though...
>
>But then why would you ever need to do that? After all you can just inherit the form from the one you're trying to copy and then simply not put any code in there <g>...
>
>+++ Rick ---
>
>>
>>>Yes, but probably not the way you think...
>>>
>>>Codebehind specifies the name of the source file and the name of the class. Youy can just change those values and point them at a different CodeBehind file.
>>>
>>>I've done this by accident before and it seems to work actually although at the time I really screwed up my code with that <g>....
>>>
>>>
>>>+++ Rick ---
>>>
>>>
>>>
>>>
>>>>All,
>>>>
>>>>Is there a way to have multiple ASPX pages share a single code behind file in VS.Net?
>>>>
>>>>Thanks
>>>>
>>>>Rex
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform