Asp.net Dynamic ashx Stylesheet not always working on postback

671 Views Asked by At

Help. I have a site when the customers can add their own style rules to their websites. The whole process works perfectly, but when they page with the dynamic stylesheet posts back, sometimes only some of the stylesheet rules load. The initial page loads all of the styles, and some postbacks it loads fine as well, but on some of the postbacks (about 60%) certain styles randomly get dropped. Is it a lifecycle issue? Its so random, I have nothing to trace. Is there a way to load the dynamically generated stylesheet and persist it throughout the session, then dismiss it?

Thanks!!! The answers I get here always are spot on, someone has got to know whats going on.

1

There are 1 best solutions below

3
On

So if I understand right the CSS file is there but only some of the rules are being applied? Are you sure there are no other stylesheets after the one the user uploads that are conflicting/overriding the users' sheet?

Have you been looking in Firebug at all to see what sheets are loaded and where the styles that are being overridden are getting their styles from?