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. UserControl loosing Styles.css...

UserControl loosing Styles.css...

Scheduled Pinned Locked Moved ASP.NET
csswpfdesignquestion
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.
  • D Offline
    D Offline
    Dr_X
    wrote on last edited by
    #1

    I have usercontrols that are loaded into a PlaceHolder by using plhControl.Controls.Add(....). When initially loaded, the styles.css file is applied correctly to all of the controls. If I do a postback, all of the applied styles with in the usercontrol are removed. The styles.css is defined in the header control on the page which is defined at design-time, "". It is simply dragged-n-dropped to the page. Any ideas? Michael I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)

    M 1 Reply Last reply
    0
    • D Dr_X

      I have usercontrols that are loaded into a PlaceHolder by using plhControl.Controls.Add(....). When initially loaded, the styles.css file is applied correctly to all of the controls. If I do a postback, all of the applied styles with in the usercontrol are removed. The styles.css is defined in the header control on the page which is defined at design-time, "". It is simply dragged-n-dropped to the page. Any ideas? Michael I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, It seems to me that it's a known issue, AFAIK there are some ways which you may consider: + You can populate the absolute virtual path of the stylesheet file, then assign it to the href property of the link element. + Embed the style classes in the web page with the style tag. If you have this problem when using the SmartNavigation, then this blog shows you a work-around solution. http://scottonwriting.net/sowblog/posts/2650.aspx[^]

      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