Accesing class from user control
-
I have create a class called settings to store site settings that are needed in various usercontrols. In my page_load of my web page (webform1.aspx), I am setting the properties for this class. I have also created a few webusercontrols that are being added to the webform1.aspx page. However, I am not sure how to access the settings class with the set values from within the webusercontrol. The webpage and usercontrols do not share a common base class.
-
I have create a class called settings to store site settings that are needed in various usercontrols. In my page_load of my web page (webform1.aspx), I am setting the properties for this class. I have also created a few webusercontrols that are being added to the webform1.aspx page. However, I am not sure how to access the settings class with the set values from within the webusercontrol. The webpage and usercontrols do not share a common base class.
To clarify... I want to create a class that will hold setting values and I want this to be accessible/common with the webform and the usercontrol. The values would be set in the webform, and when the usercontrol is added to the webform, it will retrieve the values needed from the common settings class.