ScriptManager Master Pages

7 posts, 0 answers
  1. Ryan
    Ryan avatar
    7 posts
    Member since:
    Jun 2011

    Posted 01 Aug 2011 Link to this post

    I am using master pages in my asp.net web app. I receive this error:

    The control with ID 'RadScriptManager1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.


    I've tried just about every combination of where to put this tag and nothing works. What do I need to add to the master page and what do I add to the pages inherited from the master page? And most importantly WHERE to place the tag?
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Aug 2011 Link to this post

    Hello Ryan,

    Here is the following scenario which I tried and it worked as expected.
    Masterpage.aspx:
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
      <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
      </telerik:RadScriptManager>
    </asp:ContentPlaceHolder>
    Contentpage.aspx
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
       <telerik:RadGrid ID="RadGrid1" runat="server">
       . . . .
       </telerik:RadGrid>
    </asp:Content>

    Thanks,
    Shinu
  3. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 02 Aug 2011 Link to this post

    hi Ryan,

    the solution given by shinu is perfect.

    You can also add ScriptManager Tag after form tag in master page.(so you can also use telerik control in master page also.)

    Thanks,
    Jayesh Goyani
  4. Ryan
    Ryan avatar
    7 posts
    Member since:
    Jun 2011

    Posted 03 Aug 2011 Link to this post

    Nope still doesn't work I'm forced to place the tag on my content page
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 04 Aug 2011 Link to this post

    Hello,

    Please check my code and let me know if any concern.

    Master page
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
              <telerik:RadScriptManager ID="RadScriptManager1" runat="server"/>
         </div>
        <div>
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
             
            </asp:ContentPlaceHolder>
        </div>
        </form>
    </body>
    </html>

    Content Page
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Demo.aspx.cs" Inherits="Demo" MasterPageFile="~/MasterPage.master" %>
     
    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="head"></asp:Content>
    <asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server"/>
    </div>
    </asp:Content>


    Thanks,
    Jayesh Goyani
  6. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 04 Aug 2011 Link to this post

    Hello,

    if still you are not able to solve your issue please send your code.

    Thanks,
    Jayesh Goyani
  7. Jorge irving
    Jorge irving avatar
    5 posts
    Member since:
    Oct 2012

    Posted 23 Oct 2012 Link to this post

    hello jayesh.

    i´m experimenting the same troubles, could you solve your problem?

    thanks in advance!

Back to Top