Well, I don't seem to be getting any help over at the .net forum so maybe you can help.
I have a master page and master style page. How can I have a style sheet linked to a "child" page? When I try to insert one it doesn't seem to like living within the tags given for a child page. Does the master style sheet have access to the child's components? They don't seem to change when I set up properties in the master style sheet.
I think that you dont have the pathing set up correctly. I had some issues w/ the whole style sheet thing. Instead i found out about themes and they are worth looking into.
Here is how i have mine set up.
The mast page is at the root of the web. You could really have this anywhere you want it. Then i created the folder
App_Themes (This is a special .net folder such as App_Code, App_Data)
In the App_Themes Folder you add a new .net folder ( a theme folder is the only folder you can add at this level). I have two themes (Black, White).
In each Folder i have my .css file for the whole site plus an Images folder ( in this level you can actually add a folder).
Now in my web.config page i have this code
This tells the site to use the .css sheet associated with the Black theme.
So in the end i have to themes set up which means i have 2 different css files for the site. Depending on which 1 i choose it will completly change the way the site looks and feels. THis is the great thing about Themes.
You can also change themes in code. So you can have like a user settings and allow the user to select which look they want.
You have to set this in the Page_PreInt sub. ..
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
Page.Theme = "White"
My problem is that I want to handle the positioning of a gridview component using a style sheet. The gridview is in the contentcontainer of the child sheet. Using it's id, I can't seem to do anything that has any effect on it regardless if I put the style properties the master.css sheet.
I tried creating a stylesheet just for that particular child sheet but couldn't figure out how to link it to the child. The code complains when I stick the reference in the child <asp tags.