This is a migrated thread and some comments may be shown as answers.

CSS lost on full postback

3 Answers 425 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ragnar Osterlund
Top achievements
Rank 1
Ragnar Osterlund asked on 12 Apr 2010, 11:44 AM
Hi,

In one kind of scenario of diffrent types of postbacks (full and async) and toggled visibility, at least one Telerik control seem to lose its CSS, from the WebResource.axd. In this example I use the RadScheduler. If in the page (code following below), one first clicks the "Toggle Rad Scheduler Visibility" button, then clicks the "Full Postback" button, then clicks the "Toggle Rad Scheduler Visibility" button again, the CSS will not be loadad for the scheduler any more, so it will not look as it should. If in this state one clicks "Full Postback" again, the CSS is loaded again.

Is there any method one should call on the Telerik controls to make sure their CSS is always loaded? What can one do, any suggestions? Or is there something I have missed?

Page markup and codefile:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AsyncCSSTest2.aspx.cs" Inherits="RadAsyncTest.AsyncCSSTest2" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
     
        <asp:ScriptManager ID="SM" runat="server" 
            EnablePartialRendering="true"
        </asp:ScriptManager> 
         
        <telerik:RadCodeBlock runat="server"
            <telerik:RadAjaxManager runat="server" ID="AjxMgr"
            </telerik:RadAjaxManager> 
 
            <asp:UpdatePanel runat="server" ID="UP" UpdateMode="Conditional"
                <ContentTemplate> 
                 
                    <asp:Button runat="server" ID="Toggle" Text="Toggle Rad Scheduler Visibility" /> 
                    <asp:Button runat="server" ID="FullPost" Text="Full Postback" /> 
                     
                    <telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Telerik" 
                        Visible="true" 
                        DataKeyField="eventID" 
                        DataStartField="startdate" 
                        DataEndField="enddate" 
                        DataSubjectField="subject" 
                        DataDescriptionField="description"
                    </telerik:RadScheduler> 
                             
                </ContentTemplate> 
                 
                <Triggers> 
                    <asp:PostBackTrigger ControlID="FullPost" /> 
                </Triggers> 
                 
            </asp:UpdatePanel> 
 
        </telerik:RadCodeBlock> 
         
    </div> 
    </form> 
</body> 
</html> 
 


using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
namespace RadAsyncTest 
    public partial class AsyncCSSTest2 : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            Toggle.Click += delegate { 
                RadScheduler1.Visible = !RadScheduler1.Visible; 
            }; 
        } 
    } 
 

3 Answers, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 12 Apr 2010, 12:16 PM
Hi Ragnar,

This is a known limitation of our current skin registration logic. You can fix the problem by always setting EnableAjaxSkinRendering to true in Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    RadScheduler1.EnableAjaxSkinRendering = true;
}

We're looking to resolve this problem in the future. Apologies for any caused inconvenience.

Regards,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mike
Top achievements
Rank 1
answered on 01 Jul 2014, 03:55 PM
This doesn't work for us in IE8 and IE9.  Any other thoughts? We have the latest versions of the controls.  
0
Marin Bratanov
Telerik team
answered on 03 Jul 2014, 12:15 PM

Hi Mike,

It is possible that your page has reached IE's stylesheet limit and it does not parse the additional stylesheets. Could you go through this blog to see if this is the case and whether the suggested solution (adding a RadStylesheetManager) helps: http://blogs.telerik.com/aspnet-ajax/posts/10-05-03/internet-explorer-css-limits.aspx? If the issue does not manifest with other browsers, the IE limitation is most likely the reason.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Ragnar Osterlund
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Mike
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or