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

ScriptManager Master Pages

6 Answers 374 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 01 Aug 2011, 09:10 PM
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" />

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Aug 2011, 06:14 AM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 02 Aug 2011, 06:49 AM
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
0
Ryan
Top achievements
Rank 1
answered on 03 Aug 2011, 02:22 PM
Nope still doesn't work I'm forced to place the tag on my content page
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Aug 2011, 05:29 AM
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
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Aug 2011, 05:30 AM
Hello,

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

Thanks,
Jayesh Goyani
0
Jorge irving
Top achievements
Rank 1
answered on 23 Oct 2012, 09:53 PM
hello jayesh.

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

thanks in advance!

Tags
General Discussions
Asked by
Ryan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jayesh Goyani
Top achievements
Rank 2
Ryan
Top achievements
Rank 1
Jorge irving
Top achievements
Rank 1
Share this question
or