SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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" "">
<%@ 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="">

<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">



share|improve this question
3 – Steve B Jul 10 '12 at 13:28
@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 :-) – Anders Rask Jul 10 '12 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 '12 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 ? – PeteEngineer Jul 11 '12 at 4:59
up vote 0 down vote accepted

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

share|improve this answer
From the link i have added the scripmanager in code behind it is working fine. – PeteEngineer Jul 11 '12 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"> 
share|improve this answer
Not working !!! – PeteEngineer Jul 11 '12 at 10:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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