|
|
 Rank: YAF Forumling
Joined: 5/13/2008 Posts: 8
|
Per an earlier post I was successful in dropping a Site.master on top of the default.aspx that YAF runs off of. However, when I add a new stylesheet to the <head> tag I get the following error:
There has been a serious error loading the forum. No futher information is available.
Please contact the administrator if this message persists.
I don't understand why adding a reference to a stylesheet would break the forum. I am hoping to use this simple .css file in addition to the YAF thematic CSS files specifically to handle the layout of my Site.master.
|
|
|
 Rank: YAF Head Dude

Joined: 10/10/2004 Posts: 2,946 Location: Honolulu, HI
|
Turn customErrors "Off" in web.config and then tell us the real error... <customErrors mode="Off" /> Also, provide the exact <head></head> code here so we can see more what's wrong. It's really hard to help if you don't help us understand the situation... "When you are grateful, fear disappears and abundance appears”." 
|
|
|
 Rank: YAF Forumling
Joined: 5/13/2008 Posts: 8
|
Fixed the error by adding the css as a control to YafHead (the header object) in the code behind. In response to your question, I was originally trying the following: Code:<head id="YafHead" runat="server"> <link href="<%= Page.ResolveUrl("~/public/stylesheets/Main.css") %>" rel="stylesheet" type="text/css" /> </head> I removed the offending <link> tag and replaced it with the following in my Site.master code behind to make it work: Code: if (!IsPostBack) { HtmlLink _css = new HtmlLink(); _css.Href = "public/stylesheets/Main.css"; _css.Attributes.Add("type", "text/css"); _css.Attributes.Add("rel", "stylesheet");
YafHead.Controls.Add(_css); }
|
|
|
 Rank: YAF Forumling
Joined: 5/13/2008 Posts: 8
|
After further testing, I had to remove the IsPostBack check as the stylesheet became lost on a couple pages.
|
|
|
| Users browsing this topic |
|
Guest
|
YAFPro Theme Created by Jaben Cargman (Tiny Gecko)Powered by YAF 1.9.3 RC2 |
YAF © 2003-2008, Yet Another Forum.NETThis page was generated in 0.070 seconds.