This is a migrated thread and some comments may be shown as answers.
RadScheduler in ASP.NET MVC
2 Answers 216 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Jan asked on 23 Sep 2009, 08:08 AM

I have so many problems to run RadControls (Scheduler) in ASP.NET MVC.I have read all Your tutorials and examples, but with no success.One of my last exception was : The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). So I added everything to RadCodeBlock. It took me to another exception: Control 'ctl00_RadScriptManager1' of type 'RadScriptManager' must be placed inside a form tag with runat=server. I am totaly lost, trying to find the way from Your examples.

Can You give me a hint, what I am doing wrong?
This is my master page:

<%@ Master Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewMasterPage" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""
<html xmlns=""
<head runat="server"
        <asp:ContentPlaceHolder ID="TitleContent" runat="server" /> 
     <telerik:RadCodeBlock runat="server" ID="zkouska1"
    <%= Html.GeneralScript("jquery-1.3.2.min.js")%> 
    <%= Html.GeneralScript("jquery.crm.additionalMethods.js")%> 
    <%= Html.GeneralScript("MicrosoftAjax.js")%> 
    <%= Html.GeneralScript("jquery.cookie.js")%> 
    <%= Html.GeneralScript("jquery-ui-1.7.2.custom.min.js")%> 
    <%= Html.Css("Site.css")%> 
    <%= Html.Css("themes/base/jquery-ui-1.7.2.custom.css")%> 
    <%= Html.Css("menu.css")%> 
    <%= Html.Css("ModalControl.css") %> 
    <%= Html.GeneralScript("formObserver/jquery.formobserver.js")%> 
   <%= Html.GeneralScript("ui/ui.core.js")%> 
    <%= Html.GeneralScript("ui/ui.dialog.js")%> 
    <%= Html.CustomScript("menu/lib/chili-1.7.pack.js")%> 
    <%= Html.CustomScript("menu/lib/jquery.easing.js")%> 
    <%= Html.CustomScript("menu/lib/jquery.dimensions.js")%> 
    <%= Html.CustomScript("menu/jquery.accordion.js")%> 
    <%= Html.RegisterJS(ScriptStyleLibrary.Validation) %> 
    <%= Html.RegisterJS(ScriptStyleLibrary.Tabs) %> 
   <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1"
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.TreeView.css" /> 
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Forest.TreeView.Forest.css" /> 
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Menu.css" /> 
            <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Forest.Menu.Forest.css" /> 
    <asp:ContentPlaceHolder ID="headerContent" runat="server" /> 
 <script type="text/javascript"
     //no conflict with prototype 
     //    jQuery.noConflict(); 
     jQuery(document).ready(function() { 
         // second simple accordion with special markup 
             active: false
             header: '.head', 
             navigation: true
             event: 'dbclick', 
             fillSpace: false
             animated: 'easeslide' 
         $(".btn-slide").click(function() { 
             $(this).toggleClass("historyactive"); return false
    <p><a id="top" href="#begin-main-content" class="skip-nav">Skip Navigation</a></p> 
    <div id="pg"
        <div id="hd"
            <div id="hd-toparea"
                <img src="~/Content/Images/headbanner.png" alt="Head banner" runat="server" /> 
                <div id="vistoslogo"
                    <a href="~/Default.aspx" runat="server"
                        <img src="~/Content/Images/vistoscrm.png" alt="VISTOS CRM" runat="server" /> 
                <table id="flagbox-position"
                            <img id="Img2" src="~/Content/Images/layout/2layout_06.png" alt="Flag box" runat="server" /> 
                        <td id="flagbox"
                            <%= Html.ActionLinkImage<HomeController>(i => i.Language("cs-CZ"), "~/Content/images/flags/cs.png","Česky")%> 
                            <%= Html.ActionLinkImage<HomeController>(i => i.Language("cs-SK"), "~/Content/images/flags/sk.png""Slovensky")%> 
                            <%= Html.ActionLinkImage<HomeController>(i => i.Language("en-US"), "~/Content/images/flags/en.png""Anglicky")%> 
                            <%= Html.ActionLinkImage<HomeController>(i => i.Language("fr-BE"), "~/Content/images/flags/fr.png""Francouzsky")%> 
                            <img id="Img3" src="~/Content/Images/layout/2layout_08.png" alt="Flag box" runat="server" /> 
        <div id="sd-nav"
            <%= Html.Menu("navigation",true) %> 
        <div id="userstatus"
            <% Html.RenderPartial("LogOnUserControl"); %> 
        <div class="historyPanelWrap"
            <div id="historypanel"
                <%= Html.PageVisitsHistory() %> 
            <div class="slide"
                <a href="#" class="btn-slide">Historie</a> 
        <div id="main-nav"
            <%= Html.ContextMenu("ctxMenu",true) %> 
        <div id="bd"
            <div id="content"
                <a href="#begin-main-content" title="begin main content" id="begin-main-content"
                <asp:ContentPlaceHolder ID="MainContent" runat="server" /> 
            <div id="copyright"
        <div id="searchPanel"
     <telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableScriptCombine="true" /> 
      <% Html.jQuery().ScriptManager().Render(); %> 

2 Answers, 1 is accepted

Sort by
Atanas Korchev
Telerik team
answered on 23 Sep 2009, 11:49 AM
Hello Jan,

Please check this forum thread. We have attached a working demo of RadScheduler in MVC. Also make sure you are using an up-to-date version of Telerik.Web.UI.dll.

If the sample application does not help I suggest you open a support ticket and send us your project.

the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Chad Whitacre
Top achievements
Rank 1
answered on 11 Jan 2010, 05:13 PM
For the record, solving this appears to be as simple as the error message indicates. The RadScriptManager wants to be a child of a <form runat="server"></form> tag. When I went back and looked, my page already had one of these on it (perhaps it was added when I created the RadScriptManager in design mode? I moved it lower on the page in code mode later on), so I simply moved the control into that tag and it works now.
Asked by
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Chad Whitacre
Top achievements
Rank 1
Share this question