M
musosdev
Hi guys
I'm trying to make my code as streamlined as possible, and add CSS file
references dynamically when they are required, for example, if a page
contains a webcontrol, then the related CSS file is added by the webcontrol.
This prevents me having to remember to add the CSS file to the page if I use
a certain webcontrol.
I have a MasterPage with an array of StyleSheets, and a public function for
adding new stylesheets. That works great from either a content page, or the
content page of a nested master.
However, how can I do it from webcontrol? The nesting is something like...
MyMaster.master - contains public AddStyleSheet() function
- AboutMySite.master
- About_Home.aspx
- MyWebControl.aspx - this needs to be able to add its stylesheet using
AddStyleSheet() from the top-level master.
Is what I'm trying to do possible, and if so how can I this?!
Thanks,
Dan
I'm trying to make my code as streamlined as possible, and add CSS file
references dynamically when they are required, for example, if a page
contains a webcontrol, then the related CSS file is added by the webcontrol.
This prevents me having to remember to add the CSS file to the page if I use
a certain webcontrol.
I have a MasterPage with an array of StyleSheets, and a public function for
adding new stylesheets. That works great from either a content page, or the
content page of a nested master.
However, how can I do it from webcontrol? The nesting is something like...
MyMaster.master - contains public AddStyleSheet() function
- AboutMySite.master
- About_Home.aspx
- MyWebControl.aspx - this needs to be able to add its stylesheet using
AddStyleSheet() from the top-level master.
Is what I'm trying to do possible, and if so how can I this?!
Thanks,
Dan