I am getting the layout issue for calendar webpart in my page .

with the error message :

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

Its looks like there is no scriptmanager.I dont know where to put it

I have below my designer code ..

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ Page Language="C#" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register tagprefix="WebParts" namespace="QS.SharePoint.WebControls.WebParts" assembly="QS.SharePoint.EventCalendarList, Version=, Culture=neutral, PublicKeyToken=5242205e2f823a28" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<meta name="WebPartPageExpansion" content="full" />
<meta name="ProgId" content="SharePoint.WebPartPage.Document" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<form id="form1" runat="server">
<WebPartPages:SPWebPartManager runat="server" id="SPWebPartManager">
<WebPartPages:WebPartZone id="g_7A9120292BC3473792FEDF170F3916AE" runat="server" title="Zone 1">
<WebParts:EventCalendarListWebPart runat="server" FirstDayOfWeek="Default" 
ListName="Calendar" SiteUrl="" 
NumDaysInEventListing="3" ID="g_095dc4fc_c2ac_4e33_8ff5_8142e32bc7e5" 
ShowCalendar="True" Description="Displays events in a calendar and a list." 
ShowListing="True" Title="Event Calendar Listing" __MarkupType="vsattributemarkup"
  WebPart="true" __designer:IsClosed="false" partorder="2">



  • @PeteEngineer welcome to our forum. If you expect us to help you with your issue, please elaborate on what you have tried so far instead of expecting us to do your job for you :-) Jul 10, 2012 at 13:56
  • You should be able to just drop a script manager on the page in designer view. It just sits there.
    – Mike
    Jul 10, 2012 at 14:24
  • I have added scriptmanager in masterpage its not working, i also added in the designer page of webpart its not working , so may be i am positioning in a wrong location , could you tell me where exactly i need to place the code ? Jul 11, 2012 at 4:59

2 Answers 2


You need to add the tag at the top of the page.


  • From the link i have added the scripmanager in code behind it is working fine. Jul 11, 2012 at 10:16

Change this

<form id="form1" runat="server"> 
<WebPartPages:SPWebPartManager runat="server" id="SPWebPartManager"> 

to this

<form id="form1" runat="server"> 
<asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />
<WebPartPages:SPWebPartManager runat="server" id="SPWebPartManager"> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.