Installed AjaxToolkit but get the error "A ScriptManager is required " error ? What is going on?

So I created a new tab in my toolbox and added the AjaxToolkit file which I placed in my bin folder first. Everything works fine, the ajax tools are displaying no problem. So next I decide I want to add a calendarExtender to my gridview and associate it with a button so when a user edits the appoitment date field they will be able to select it from the calendar. However when I run the file I recieve this error:

A ScriptManager is required on the page to use ASP.NET AJAX Script Components.
Exception Details: System.InvalidOperationException: A ScriptManager is required on the page to use ASP.NET AJAX Script Components.

Source Error:

 

Line 309:                    if (null == scriptManager)
Line 310:                    {
Line 311:                        throw new InvalidOperationException(Resources.E_NoScriptManager);
Line 312:                    }
Line 313:                    if (scriptManager.IsInAsyncPostBack &&
 

 Source File: C:\Inetpub\wwwroot\ajax\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs    Line: 311

Here is the portion of the gridview I am working with;

<asp:TemplateField HeaderText="Appointment Date" 
                SortExpression="appointment_date">
                <EditItemTemplate>
                
                    <cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
                    TargetControlID="TextBox1" Format="MM/dd/yyyy" PopupButtonID="Button2">
                    </cc1:CalendarExtender>
                    <asp:Button ID="Button2" runat="server" Text="Button" />
                    <asp:TextBox ID="TextBox1" runat="server" 
                    Text='<%# Bind("appointment_date") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>


Any idea what I am doing wrong here? I also tried just loading an ajax calendar from the toolkit outside of the gridview with the same error.

Thank you!

0
shawn
4/24/2009 8:58:08 PM
asp.net.ajax_control_toolkit 17816 articles. 1 followers. Follow

7 Replies
1454 Views

Similar Articles

[PageSpeed] 40

 first thing . . check  if your website is Ajax enable or not ..

second .. you have to darg a Script manager control when you are dealing with ajax ..

and I think the Ajax calendar extender will not work using your way .. I think you need to add dynaically from RowDataBound event and give TextBox Cleint Id to the TargeControlID .. check it first .. 


Please remember to click “Mark as Answer” on the post if this answer helps you.

Abdulla AbdelHaq
MCTS, MCPD
How to ask a question


0
Abdulla
4/24/2009 9:47:25 PM

Thank you for the response.

I am pretty sure AJAX is enable because I have a gridview that when edited doesn't refresh a form I have on the same page. How can I check to be sure it is enabled? Also where should I put the script manager exactly? Before the ajax code? should I put the ajax code between the script manager tags? I just need to know the correct syntax. Sorry to be a bother. I have worked on standard ASP sites for a while and am just diving in head first to .NET and C# and AJAX. I am a newbie but a quick study and learner.

Thank you!

Shawn

0
shawn
4/25/2009 1:37:28 AM

Hi, you just add your calendar like this

<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>

<cc1:CalendarExtender runat="server" TargetControlID="txtdate">

</cc1:CalendarExtender>

No updatepanel required, but make sure you have scriptmanager


Hope This One Can Help.
Thanks

To Be Happy Is To Be YourSelf

Please remember to mark my reply as answers if it's the answer to your question.
0
Sayre
4/25/2009 2:12:10 AM

Thank you! How should I setup script manager exactly? I drag and drop it into my page but where should I place it? should I set the bindings to the calendar? Thanks!

0
shawn
4/25/2009 2:33:47 AM

Hi, sorry for late reply.

something like this

<form runat="server" id="frm1">

 <scripmnger id="sm1" runat="server" />

.......

</form>


Hope This One Can Help.
Thanks

To Be Happy Is To Be YourSelf

Please remember to mark my reply as answers if it's the answer to your question.
0
Sayre
4/25/2009 3:03:56 AM

shawn.bordeaux:

Thank you! How should I setup script manager exactly? I drag and drop it into my page but where should I place it? should I set the bindings to the calendar? Thanks!

 

Ok .. lets reform the question..

Q1. Should I use the ajax code between Script manager ..

A.  No ..

 Q 2.  why Should I use Script Manager with Ajax ?

A. http://www.asp.net/Ajax/Documentation/Live/overview/ScriptManagerOverview.aspx

 

  Q 3. where should I place the Script Manager?

Just you drag drop the Script Manager into the page .. it does not matter where you place it.. but off course  it should be inside the form tag ..

 

Q 4. How do I know that my website is ajax enabled .

A. you just goto the webconfig file.. you will find new sections added for ajax enabling ..

http://theruntime.com/blogs/jaykimble/archive/2007/01/26/How-To-Enable-Microsoft-ASPNET-Ajax-Extension-V10-and-Jan-2007-CTP-on-an-existing-site-.aspx

 

have a look to the below sample .. how to use Ajax Extender inside gridivew

  

1    <body>
2 <form id="form1" runat="server">
3
4 <asp:ScriptManager ID="ScriptManager1" runat="server">
5 </asp:ScriptManager>
6
7 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
8 <Columns>
9 <asp:BoundField DataField="User_Name" HeaderText="User Name" />
10 <asp:TemplateField>
11 <ItemTemplate>
12 <asp:TextBox runat="server" id="textbox1"></asp:TextBox>
13 <cc1:CalendarExtender ID="CalendarExtender1" runat="server"
14 TargetControlID="textbox1" PopupButtonID="textbox1"
15 ></cc1:CalendarExtender>
16 </ItemTemplate>
17 </asp:TemplateField>
18 </Columns>
19 </asp:GridView>
20
21
22 </form>
23 </body>

 
Finally, it seems that you are new in Ajax world .. use this link http://www.asp.net/ajax/

you can see Ajax live sample .. download toolkit .. watch video and download them ..

I hope that's help you :)


Please remember to click “Mark as Answer” on the post if this answer helps you.

Abdulla AbdelHaq
MCTS, MCPD
How to ask a question


1
Abdulla
4/25/2009 7:12:01 AM

Awesome! Thank you for breaking everything out for me like that. I will work on it now using your advice. I really appreciate the long detailed response to my newbie questions.

best regards,

Shawn

0
shawn
4/25/2009 4:16:44 PM
Reply:

Similar Artilces:

I couldn't install Visual Studio.Net 2003, while installing an error message "Internal Error is comming"
[DMW: deleted due to the length of the log, and what follows is what's important][09/29/05,14:28:23] Visual Studio .NET Enterprise Architect 2003 - English: ***ERRORLOG EVENT*** : ACTION FAILURE: Action ended 14:28:23: CADpc.D0DF3458_A845_11D3_8D0A_0050046416B9. Return value 3. See MSI log for details.[09/29/05,14:28:23] Visual Studio .NET Enterprise Architect 2003 - English: ***ERRORLOG EVENT*** : ACTION FAILURE: Action ended 14:28:23: INSTALL. Return value 3. See MSI log for details.[09/29/05,14:28:30] Visual Studio .NET Enterprise Architect 2003 - English: MsiInstallProduct return cod...

Error during method "CreateMailMessage" from "MailDefinition" object
 Hi, I am having trouble to send E-mail when using maildefinition object. I need to read email body from external txt file, then do some replacements and send it. Only way (what i know - instead of writing my own code), how to get the text  to the body of MailMessage is using the MailDefinition method BodyFileName() When I set everythig up after atempt to send the email I get this error: "The specified string is not in the form required for an e-mail address." I am sure, that the adress i right(it' even valiated throug regularexpretion validator).  Does any b...

"Error Group: WINSOCK" "Error Code:11004"
Hi Just setup iPrint on the server and tried to install the printer to the laptop and got the following message: Error code:11004 Error message: Winsock 11004 - The DNS name has been found in the database, but its associated data is not correct. Error group: WINSOCK Error code:11004 Anyone know what associated data it is referring to? Thanks in advance -- iangh2 A quick Google found this on http://www.sockets.com/err_lst1.htm WSANO_DATA (11004) Valid name, no data record of requested type Berkeley description: The requested name is valid, but does not hav...

VS.NET 2005 is ignoring in web.config strict="true". I get no error when I try this: Dim x As Integer = "string"
Hello,I have this in my VS.NET 2005 web.config <compilation debug="true" strict="true" explicit="true">When I do this in my vb code:Dim x As Integer = "string"I get no error. When I hit compilation I also get no error. What am I doing wrong?Thanks for helping!Regards,J. Bauer It's a bug of some sort See this response by Scott Guthriehttp://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=3c1c9898-8076-4f69-a5e2-e99573d03c6e Unfortunately we don’t have a GUI based way to configure this. L It is something we will make sure gets added back in, though, with the next...

ERROR: Using install-module.pl requires that you install "make".
--_005_7C2D9ABAD3B1744E97650076A3F2E91123C5715BONENETEXCH07ser_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi there Below is the issue: User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 F= irefox/10.0.2 Build ID: 20120215223356 Steps to reproduce: whenever I execute "/data/perl5.14/bin/perl-static install-module.pl DateTi= me" or "perl install-module.pl DateTime", or try to install any other modul= es. Actual results: It comes out "ERROR: Using install-module.pl...

Getting "No error" instead of "No such file or directory" on Win32
Hi all, in this CPAN testers XML-LibXML test failure: http://www.cpantesters.org/cpan/report/d9cf95fc-d5e8-1017-8e8a-88a105085451 I am getting this: [QUOTE] t/01basic.t ......................... ok # Failed test 'error parsing non-existent does_not_exist.xml' # at t/02parse.t line 238. # 'Could not create file parser context for file "does_not_exist.xml": No error at t/02parse.t line 237. # ' # doesn't match '(?-xism:\ACould not create file parser context for file "does_not_exist\.xml": No\ such\ file\ or...

error message: "Visual Studio .NET cannot create the application <application>. The likeliest problem is that required components are not installed on the local Web server."
after enabling ssl using iis certificate services, creating and installing server and client certificates; i encountered this message when i try to reopen the project in vs 2003. how to work with ssl web apps in vs.net. please reply asap......

"Server Error" after hitting "GO" on mobile broweser
Treo 650 returns "server error" after hitting "GO" in WEBACCESS for groupwise 6.0 running on netware 6.0. Any Ideas? Phil Phil, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following options: - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp - Check all of the other support tools and options available at http://support.novell.com in both the "free produ...

Why I always get a error: "Installation aborted because the item was a duplicate of an item already installed."
I got this error when I install any starterkit. Why? I have not installed them before. And I can't saw them in my tempaltes panel. Please kindly help me, thanks. I am having the same problem - any tips appreciated. Try these steps if you're experiencing problems installing the VSI file: For C# in Visual Studio 2005 beta 2: - Start the .vsi installation file - Click on Review button - Copy the CS zip file - open Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual Web Developer directory - In Visual Web Develper directory create directory called VisualC# - Past...

(error 2329) "encountered an unexpected error installing this package"
What does error code 2329 mean? *Story:* Delphi 2010 crashes when trying to open a package containing a (otherwise working) component. No error message is given and i have no clue what i did wrong. The repair function gave me the error +"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2329."+ I decided to reinstall RAD Studio 2010. Removing everyting went fine. The install function now gives me the same error. Near the bottom it says +"File: bantam.dll, Directory: C:\Program F...

VS .net error
Hi Anybody experienced this problem...? The intelligence has gone from my Visual Studio .Net 2003... help All the coloring has despaired from my code - apart from the comments which are still green. The intelligence is not working... I dont get any suggestions on what to use. I cant use the undo - I only get this error: Unknown undo/redo error I have search on the internet, but I havent managed to find an answer to why this is happening... When I build the application I get the coloring back, but as soon as I try and change something in the code it all goes again.. ...

Parser Error <atlas:ScriptManager ID="sm" runat="server" EnablePartialRendering="True">
I am getting the following error, and I have no idea where it is coming from, can anyone point me in the right direction please? Line 31: </asp:DropDownList><br /> Line 32: <br /> Line 33: <atlas:ScriptManager ID="sm" runat="server" EnablePartialRendering="True"> Line 34: <Scripts> Line 35: <atlas:ScriptReference Path="../../Includes/TextChangedBehavior.js" /> Rich  Can you provide a little more information please. Be a little more detailed. F...

"Error on page" error?
Hello, I have recently set up Webaccess and it seems mostly to behave ok, at least when accessing it internally (on the LAN) but when accessed remotely, two things occur: Sometimes, when clicking on any of the links, I will get a "page not found" error. Then if I reload the page, it will load quite happily. The more annoying thing, though, is when I click on "Compose ...", Search Address Books" or "Search in Mailbox" I get a message on the status bar that says "Error on page" and nothing loads. I found nothing in the KB on this one...

[wxperl-users] From whence "Wx::App Error" "Fatal error: exiting"?
This is a multi-part message in MIME format. ------_=_NextPart_001_01C48798.98A9B782 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I tried to send this message some months ago (early May), but for some reason at that time I was unable to send to the wxPerl mailing list. It seems to be working now, so . . . I'm stumbling around trying to find a single, fail-free method for exiting a running wxPerl app that may or may not have open frames. The Perl functions "exit" and "die" seem vulnerable to problem...

Web resources about - Installed AjaxToolkit but get the error "A ScriptManager is required " error ? What is going on? - asp.net.ajax_control_toolkit

ASP.NET AJAX and jQuery Presentation
... : You can download the following demo Visual Studio 2008 projects: ASP.NET AJAX and jQuery Demo Illustrates how to use ASP.NET AJAX (ScriptManager, ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Programming Archives - Dirk Strauss
... On 21 July, 2014 01:00:19, in Programming , by Dirk Strauss 0 Comments Leave A Response Tagged with: Ajax Control Toolkit • ajaxtoolkitscriptmanager ...

Using jQuery to Consume ASP.NET JSON Web Services
An overview of consuming ASP.NET web services that are JSON serialized by the ASP.NET AJAX extensions, including a specific example of using ...

Brendan Enrick
Archive - Brendan Enrick

Visual Studio 2012 RC is released
... of a request via HttpRequest.Abort() Improved support for async in Web Forms including support for async page & control event handlers ScriptManager ...

Archive
Archive - The Imaginative Universal

Nu Mark Website : Welcome page
... innovation. Our products are grounded in INNOVATION . Our marketing and product development are driven by RESPONSIBILITY . ‭(Hidden)‬ ScriptManager ...

Some ASP.NET AJAX Tips and Tricks
I've been using ASP.NET AJAX alot for a while now, so I thought I'd share some of the Tips and Tricks that I've learned though my adventures. ...

Ajax Category
Ajax Category

Resources last updated: 12/2/2015 12:06:01 AM