All my presentation layer files (aspx.cs files) inherit from a presentation layer base class which handles pulling the connstring from web.config. Problem is when i have to create a usercontrol which needs SQL access. Since the user control inherits from system.web.ui.usercontrol, it can't grab connstring from the base class.
I work around this by manually instantiating an object from the base class and then grabbing the connString using the public "get" method. This seems cheesy though. Is there a recommended method to work around this? Obviously, i dont want to simply get rid of the base class.
I work around this by manually instantiating an object from the base class and then grabbing the connString using the public "get" method. This seems cheesy though. Is there a recommended method to work around this? Obviously, i dont want to simply get rid of the base class.