ASP.NET CSS on PostBack in IE 7 Not Working -


When my asp.net page makes a postback in IE7, then all css is lost I'm not using themes And CSS has been included in the back code from the masterpages.

  Protected override zero onload (EventArggs e) {base.OnLoad (e); AddStylesheetInclude ("/ static / css / global.css"); AddStylesheetInclude ("/ static / css / sifr.css"); }  

and my code is actually to be added:

  Public Virtual Zero AddStylesheetInclude (string URL) {HtmlLink link = new HtmlLink (); Link.Attributes ["type"] = "text / css"; Link.Attributes ["href"] = url; Link.Attributes ["rel"] = "stylesheet"; Page.Header.Controls.Add (link); } It works perfectly fine in Firefox, just to add more context to IE, included in the CSS file, it uses @ import to use the rest.  

[edit] This works if I take all the @import rules and have included it in the actual HTML

And you should be able to do something

  & lt; Table id = "table1" class = "highlight" />  

Comments