CSS sheets in folder
-
I wrote a code to check for Browser version and to set the Stylesheet accordingly. Now if I leave the Stylesheets at the root the code works perfect and selects the right style, but if I create a folder like "CSS" and put the styles in there and redirect the link to this folder than it want recognize the styles anymore. Can anyone tell me why? Here is my code: Public Function getStyle() As String Dim browser As Object = Request.Browser.Browser.ToLower.ToString() Dim bc As HttpBrowserCapabilities = Request.Browser Dim str As String = "" Dim Style As String = "" 'check browser and set appropriate stylesheet If browser = "ie" Then 'check for version of IE (6 or other) If bc.MajorVersion = "6" Then Response.Write("") 'Response.Write("") 'this line want work Else Response.Write("") 'Response.Write("") 'this line want work End If Else Response.Write("") 'Response.Write("") 'this line want work End If Return Style End Function code in Html header: Untitled Page <% getStyle() %> I appreciate any suggestion. Thanks
-
I wrote a code to check for Browser version and to set the Stylesheet accordingly. Now if I leave the Stylesheets at the root the code works perfect and selects the right style, but if I create a folder like "CSS" and put the styles in there and redirect the link to this folder than it want recognize the styles anymore. Can anyone tell me why? Here is my code: Public Function getStyle() As String Dim browser As Object = Request.Browser.Browser.ToLower.ToString() Dim bc As HttpBrowserCapabilities = Request.Browser Dim str As String = "" Dim Style As String = "" 'check browser and set appropriate stylesheet If browser = "ie" Then 'check for version of IE (6 or other) If bc.MajorVersion = "6" Then Response.Write("") 'Response.Write("") 'this line want work Else Response.Write("") 'Response.Write("") 'this line want work End If Else Response.Write("") 'Response.Write("") 'this line want work End If Return Style End Function code in Html header: Untitled Page <% getStyle() %> I appreciate any suggestion. Thanks
Did you view the source on your rendered page to see where the link was pointing? If you are using a master page, try "~/CSS/StyleSheetFOX.css"
I didn't get any requirements for the signature