Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. CSS sheets in folder

CSS sheets in folder

Scheduled Pinned Locked Moved ASP.NET
htmlcsswpfquestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TAK78
    wrote on last edited by
    #1

    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

    T 1 Reply Last reply
    0
    • T TAK78

      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

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups