Hello,
I'm having a strange problem with stylesheets in tabs and I hope that you can help me.
I have an Upload control and some buttons in a tab in a page and, in IE 9 only it seems (I've tested Firefox, IE 10 & Chrome, this is not an issue there), when first loaded the page does not load the css for these controls.
If a postback occurs in the tab (ie if a file is uploaded) then the css is loaded (see attached files).
Is there any way to ensure that the css is loaded in this instance?
Thank you
Paul Herzberg
5 Answers, 1 is accepted
I've tried to reproduce the problem locally by placing RadButtons and RadCloudUpload into RadPageView and RadTabStrip. I didn't noticed the described behavior on our machine. I would suggest you to check whether you set the skins of the elements concerned in the code-behind or in the markup. If you do that in the code-behind, could you check your Page_Load handler if it applies the specific skin on initial page load or it applies it only on postback.
Please, let me know if the above helps you in your scenario.
Regards,
Veselin Tsvetanov
Telerik
Hello Veselin,
Thank you for the prompt reply.
The skin is set-up in a Master page with RadSkinManager. Is it worth trying to also set the Skin on the individual controls?
Thank you
Paul
I have changed my test project so it now works with master page, containing RadSkinManager. Again, I wasn't able to reproduce the described behavior. Could you please set the Skins manually in the markup for the individual controls and then let me know if this solves the issue? Moreover, attached you will find my sample web site. Could you please modify it so the problem is reproduced and post your modifications? Note that you will have to add Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll to the Bin folder of the project.
I am looking forward to your replay.
Regards,
Veselin Tsvetanov
Telerik
Hello again,
Sorry for the slow reply, but I've finally figured out what the problem is.
IE9 has a limit of 31 stylesheets per page.
We get the Css from our own cdn server. We also use the Office 2007 skin so every control loads two stylesheets. We also load stylesheets for out own layout.
So after loading a page with 10 or so different Telerik controls IE9 stops loading any more css.
To work around this I've created a ie9fix.css file that uses "@import url()" and called it with the following code:
if
(Request.Browser.Browser ==
"IE"
&& Request.Browser.MajorVersion == 9)
{
Page.ClientScript.RegisterClientScriptBlock(
this
.GetType(),
"ie9_css_telerik"
,
@
"<link class="
"Telerik_stylesheet"
" href="
""
+
ResolveUrl(
"~/css/ie9fix.css"
) +
@
""
" rel="
"stylesheet"
" type="
"text/css"
">"
);
}
While this is not a perfect solution it will have to do.
Thank you for your help in this matter it was much appreciated.
Paul
Thank you for sharing your solution to this particular problem.
Regards,
Veselin Tsvetanov
Telerik