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. Runtime css

Runtime css

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-net
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.
  • S Offline
    S Offline
    sood_is_in
    wrote on last edited by
    #1

    Hi All, Could anyone plz tell me how i can implement Css in my asp.net project at runtime. That is i have 2 different css with me, now what i want to do is I have a form named LOGIN.aspx now when i open this page from address bar i want Css1.css to be used at that time and when i open this login.aspx from any other page i want css2.css to be used. Plz suggested something Thanks in advance If you are not cheating then you are not trying

    G 1 Reply Last reply
    0
    • S sood_is_in

      Hi All, Could anyone plz tell me how i can implement Css in my asp.net project at runtime. That is i have 2 different css with me, now what i want to do is I have a form named LOGIN.aspx now when i open this page from address bar i want Css1.css to be used at that time and when i open this login.aspx from any other page i want css2.css to be used. Plz suggested something Thanks in advance If you are not cheating then you are not trying

      G Offline
      G Offline
      gnjunge
      wrote on last edited by
      #2

      Well there are two ways: 1 Make your <link href="style/style1.css" type="text/css" rel="stylesheet" /> run serversided, by adding runat="server" to the tag, like this : <link href="style/style.css" type="text/css" rel="stylesheet" runat="server" /> . Then you can change its attributes (such as the href attribute) in your .NET code. 2 Make you <link href="style/style.aspx" type="text/css" rel="stylesheet" />, point to a ASPX file. In this aspx file you put your if statement. If logged in, Server.Transer["style1.css"], if not Server.Transfer["style2.css"] -- modified at 5:44 Wednesday 22nd February, 2006

      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