Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a global object in a web app
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01316004
Message ID:
01316344
Vues:
14
Jeff,

>Thanks. Yes, I went with checking state of the datarow.
>
>And I understand about static properties, but am still wondering if there is an object instance (the BO?) that can carry a flag across the application from webpage to the validation code in the rules code. Or does that get into subclassing the Framework which I don't want to do.

If you need to pass information to a business object from the calling environment, then you should pass it in the constructor of the business object. Lots of folks do this on the web, passing in a company pk or other id that all business objects need to know. You can choose to create a single constructor that accepts this parameter so the developer is forced to pass it, or you can overload the constructor.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform