This is weird! [modified]
-
I'm creating a multilingual website so I'm trying to dynamically include the language related stylesheet. As you might have already expected, I do this in the page head using a link tag. Well, for some reason I'm not aware of, the code below doesn't work (when I move it outside the the page head, it works though!): It gives this output: On the other hand this code works perfectly:
<link rel="stylesheet" href=<%= string.Format("\"/css/{0}\"", _language.Stylesheet) %> type="text/css" media="screen" />
This is really weird, can anybody explain what's going on?!! P.S. This is ASP.NET 2.0 UPDATE When tried to remove runat="server" from the head tag, it actually worked! The problem is that I set the page title in my code so I have to keep runat="server" in the head tag, it seems like a bug to me, what do you think?Waleed Eissa Software Developer Sydney
modified on Thursday, June 26, 2008 6:36 AM
-
I'm creating a multilingual website so I'm trying to dynamically include the language related stylesheet. As you might have already expected, I do this in the page head using a link tag. Well, for some reason I'm not aware of, the code below doesn't work (when I move it outside the the page head, it works though!): It gives this output: On the other hand this code works perfectly:
<link rel="stylesheet" href=<%= string.Format("\"/css/{0}\"", _language.Stylesheet) %> type="text/css" media="screen" />
This is really weird, can anybody explain what's going on?!! P.S. This is ASP.NET 2.0 UPDATE When tried to remove runat="server" from the head tag, it actually worked! The problem is that I set the page title in my code so I have to keep runat="server" in the head tag, it seems like a bug to me, what do you think?Waleed Eissa Software Developer Sydney
modified on Thursday, June 26, 2008 6:36 AM
The problem is one is <% and the other is <%=
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
The problem is one is <% and the other is <%=
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Thanks for noticing this (I modified the post after reading your post), but actually this is not the problem, it still give the same output!
Waleed Eissa Software Developer Sydney
-
I'm creating a multilingual website so I'm trying to dynamically include the language related stylesheet. As you might have already expected, I do this in the page head using a link tag. Well, for some reason I'm not aware of, the code below doesn't work (when I move it outside the the page head, it works though!): It gives this output: On the other hand this code works perfectly:
<link rel="stylesheet" href=<%= string.Format("\"/css/{0}\"", _language.Stylesheet) %> type="text/css" media="screen" />
This is really weird, can anybody explain what's going on?!! P.S. This is ASP.NET 2.0 UPDATE When tried to remove runat="server" from the head tag, it actually worked! The problem is that I set the page title in my code so I have to keep runat="server" in the head tag, it seems like a bug to me, what do you think?Waleed Eissa Software Developer Sydney
modified on Thursday, June 26, 2008 6:36 AM
I haven't had such an issue. you can add stylesheets from code behind page. Try that instead of doing this.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
I haven't had such an issue. you can add stylesheets from code behind page. Try that instead of doing this.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
Thanks for your reply but actually the problem is already solved (read the post till the end), I just wanted to understand what was going on Regards
Waleed Eissa Software Developer Sydney