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

RadStyleSheetManager in the header section

3 Answers 140 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 11 Feb 2011, 03:31 PM
Hello,

I come back to some of my code from 2009 and found that the RadStyleSheetManager is placed in the header section.
What was the advantage of this and is it still recommended for asp.net 4.0 ?

I recently found that my web application compiled with .net 3.5 but with .net 4 installed on the production server and with a Telerik version from 12/2010 is generating very large Viewstates and long load time.

I am porting it to ASP.Net 4 and checking every detail concerning compression and scripts combining.

Best regards
CS

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 Feb 2011, 02:54 PM
Hi Christian,

There is no need to place RadStyleSheetManager in the header section. Could your code be as a result of trying to workaround the following known issue from a previous version? -

http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/353467.aspx

Do you experience any problems if you use RadStyleSheetManager within the form tags?



Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
CSurieux
Top achievements
Rank 2
answered on 24 Feb 2011, 11:28 AM
Hi Peter,

In fact it is the Telerik extensions fo Visual studio 2010 which generate this for a Telerik Web Application template !
Why ?

here is the generated code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title>MS CRM SPLA Provisioning</title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <link href="CRMSPProvStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
   
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Web20">
    </telerik:RadSkinManager>


Before using this I must understand, as I have many problems with Wiewstate compression and page compression and CDN and Framework 4, AND TELERIK....


Best regards
CS
0
Peter
Telerik team
answered on 02 Mar 2011, 02:45 PM
Hello Christian,

The reason why RadStyleSheetManager is in the head is because it renders link tags. For XHTML compliance, link tags should be in the head of the page. I hope this answers your question.

Best wishes,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
ScriptManager and StyleSheetManager
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Peter
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or