473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding AJAX to an existing Web Application

Hello,

I am trying to utilitze the AJAX Control toolkit in my asp.net project. I
have added a reference to AjaxControlToolkit.dll, and in my page, added
these lines of code:

<ajaxToolkit:ToolkitScriptManager runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="ScriptManager1" />

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

<asp:ImageButton runat="Server" ID="Image1" ImageUrl="/images/calendar.png"
AlternateText="Click to show calendar" /><br />

<ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server"
TargetControlID="txtFrom" PopupButtonID="Image1" />

Everything builds fine, but when I actually run the page I get the error:

Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0012: The type 'System.Web.UI.ScriptManager' is
defined in an assembly that is not referenced. You must add a reference to
assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

I then added a reference to System.Web.Extensions, but I get the same error
when I refresh the page. Am I adding this reference the wrong way?

Also, and this may be related, I don't see the AJAX toolkit in my toolbox.
What am I not doing?

Thanks-

Jason
Oct 4 '07 #1
8 19911
On Oct 4, 4:33 pm, "Jason" <JasonJa...@nospam.nospamwrote:
Hello,

I am trying to utilitze the AJAX Control toolkit in my asp.net project. I
have added a reference to AjaxControlToolkit.dll, and in my page, added
these lines of code:

<ajaxToolkit:ToolkitScriptManager runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="ScriptManager1" />

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

<asp:ImageButton runat="Server" ID="Image1" ImageUrl="/images/calendar.png"
AlternateText="Click to show calendar" /><br />

<ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server"
TargetControlID="txtFrom" PopupButtonID="Image1" />

Everything builds fine, but when I actually run the page I get the error:

Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0012: The type 'System.Web.UI.ScriptManager' is
defined in an assembly that is not referenced. You must add a reference to
assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

I then added a reference to System.Web.Extensions, but I get the same error
when I refresh the page. Am I adding this reference the wrong way?

Also, and this may be related, I don't see the AJAX toolkit in my toolbox.
What am I not doing?

Thanks-

Jason
You have to add the AJAX toolkit to your toolbox manually from the
context menu | 'choose items...'.

Try going to the 'Website' menu | 'Add Reference...' | 'Browse' tab
and adding it that way.

-Michael Placentra II

Oct 4 '07 #2
Try going to the 'Website' menu | 'Add Reference...' | 'Browse' tab
and adding it that way.
By the second part I meant to add a reference to the assembly, not
still to the toolbox.

-Michael Placentra II

Oct 4 '07 #3
Thanks Michael,

I was able to add the controls to the toolbox using your suggestion, as for
the second issue, the problem still occurred.

After removing and re-adding the reference usng your suggestion, it works
like it should.

Thanks Michael!

Jason
"Mike Placentra II" <no***************************@gmail.comwrote in
message news:11*********************@50g2000hsm.googlegrou ps.com...
On Oct 4, 4:33 pm, "Jason" <JasonJa...@nospam.nospamwrote:
>Hello,

I am trying to utilitze the AJAX Control toolkit in my asp.net project. I
have added a reference to AjaxControlToolkit.dll, and in my page, added
these lines of code:

<ajaxToolkit:ToolkitScriptManager runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="ScriptManager1" />

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

<asp:ImageButton runat="Server" ID="Image1"
ImageUrl="/images/calendar.png"
AlternateText="Click to show calendar" /><br />

<ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server"
TargetControlID="txtFrom" PopupButtonID="Image1" />

Everything builds fine, but when I actually run the page I get the error:

Description: An error occurred during the compilation of a resource
required
to service this request. Please review the following specific error
details
and modify your source code appropriately.

Compiler Error Message: CS0012: The type 'System.Web.UI.ScriptManager' is
defined in an assembly that is not referenced. You must add a reference
to
assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

I then added a reference to System.Web.Extensions, but I get the same
error
when I refresh the page. Am I adding this reference the wrong way?

Also, and this may be related, I don't see the AJAX toolkit in my
toolbox.
What am I not doing?

Thanks-

Jason

You have to add the AJAX toolkit to your toolbox manually from the
context menu | 'choose items...'.

Try going to the 'Website' menu | 'Add Reference...' | 'Browse' tab
and adding it that way.

-Michael Placentra II

Oct 4 '07 #4
Darn, spoke too soon.

I was able to successfully add the controls to the toolbox, add the assembly
reference to the project, and register the assembly just fine in my .aspx
with this code:

<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

But after adding this line of code:

<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />

I see a JavaScript error that says "'Sys' is undefined".

Is there something else I am not including. This is a web application
project, not a website project, if that makes a difference.

Thanks

Jason

"Jason" <Ja********@nospam.nospamwrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
Thanks Michael,

I was able to add the controls to the toolbox using your suggestion, as
for the second issue, the problem still occurred.

After removing and re-adding the reference usng your suggestion, it works
like it should.

Thanks Michael!

Jason
"Mike Placentra II" <no***************************@gmail.comwrote in
message news:11*********************@50g2000hsm.googlegrou ps.com...
>On Oct 4, 4:33 pm, "Jason" <JasonJa...@nospam.nospamwrote:
>>Hello,

I am trying to utilitze the AJAX Control toolkit in my asp.net project.
I
have added a reference to AjaxControlToolkit.dll, and in my page, added
these lines of code:

<ajaxToolkit:ToolkitScriptManager runat="Server"
EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="ScriptManager1" />

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

<asp:ImageButton runat="Server" ID="Image1"
ImageUrl="/images/calendar.png"
AlternateText="Click to show calendar" /><br />

<ajaxToolkit:CalendarExtender ID="calendarButtonExtender" runat="server"
TargetControlID="txtFrom" PopupButtonID="Image1" />

Everything builds fine, but when I actually run the page I get the
error:

Description: An error occurred during the compilation of a resource
required
to service this request. Please review the following specific error
details
and modify your source code appropriately.

Compiler Error Message: CS0012: The type 'System.Web.UI.ScriptManager'
is
defined in an assembly that is not referenced. You must add a reference
to
assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.

I then added a reference to System.Web.Extensions, but I get the same
error
when I refresh the page. Am I adding this reference the wrong way?

Also, and this may be related, I don't see the AJAX toolkit in my
toolbox.
What am I not doing?

Thanks-

Jason

You have to add the AJAX toolkit to your toolbox manually from the
context menu | 'choose items...'.

Try going to the 'Website' menu | 'Add Reference...' | 'Browse' tab
and adding it that way.

-Michael Placentra II


Oct 4 '07 #5
I don't have any trouble using the <ajax:ScriptManager /control
instead of <ajaxToolkit:ToolkitScriptManager /with AJAX Toolkit. All
of the AJAX Toolkit controls work with the regular one for me. I
didn't realize there was an <ajaxToolkit:ToolkitScriptManager />.

Try the <ajax:ScriptManager /instead (or it might be a different XML
namespace for you depending on how you have it configured).

-Michael Placentra II
On Oct 4, 5:55 pm, "Jason" <JasonJa...@nospam.nospamwrote:
But after adding this line of code:

<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />

I see a JavaScript error that says "'Sys' is undefined".

Is there something else I am not including. This is a web application
project, not a website project, if that makes a difference.

Thanks
Jason
Oct 4 '07 #6
Thanks Mike,

No joy though. Still get the same error.

"Mike Placentra II" <no***************************@gmail.comwrote in
message news:11*********************@r29g2000hsg.googlegro ups.com...
>I don't have any trouble using the <ajax:ScriptManager /control
instead of <ajaxToolkit:ToolkitScriptManager /with AJAX Toolkit. All
of the AJAX Toolkit controls work with the regular one for me. I
didn't realize there was an <ajaxToolkit:ToolkitScriptManager />.

Try the <ajax:ScriptManager /instead (or it might be a different XML
namespace for you depending on how you have it configured).

-Michael Placentra II
On Oct 4, 5:55 pm, "Jason" <JasonJa...@nospam.nospamwrote:
>But after adding this line of code:

<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />

I see a JavaScript error that says "'Sys' is undefined".

Is there something else I am not including. This is a web application
project, not a website project, if that makes a difference.

Thanks
Jason

Oct 4 '07 #7
I fixed it by creating an empty "Ajax-enabled Web Application" project, then
seeing what sections the web.config file in that project had that mine
didn't.

I copied in the missing sections from the new project's web.config into my
project's web.config and that did the trick!

Thanks again for your help,

Jason
"Jason" <Ja********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Thanks Mike,

No joy though. Still get the same error.

"Mike Placentra II" <no***************************@gmail.comwrote in
message news:11*********************@r29g2000hsg.googlegro ups.com...
>>I don't have any trouble using the <ajax:ScriptManager /control
instead of <ajaxToolkit:ToolkitScriptManager /with AJAX Toolkit. All
of the AJAX Toolkit controls work with the regular one for me. I
didn't realize there was an <ajaxToolkit:ToolkitScriptManager />.

Try the <ajax:ScriptManager /instead (or it might be a different XML
namespace for you depending on how you have it configured).

-Michael Placentra II
On Oct 4, 5:55 pm, "Jason" <JasonJa...@nospam.nospamwrote:
>>But after adding this line of code:

<ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />

I see a JavaScript error that says "'Sys' is undefined".

Is there something else I am not including. This is a web application
project, not a website project, if that makes a difference.

Thanks
Jason


Oct 4 '07 #8
On Oct 4, 6:52 pm, "Jason" <JasonJa...@nospam.nospamwrote:
I fixed it by creating an empty "Ajax-enabled Web Application" project, then
seeing what sections the web.config file in that project had that mine
didn't.

I copied in the missing sections from the new project's web.config into my
project's web.config and that did the trick!

Thanks again for your help,

Jason

"Jason" <JasonJa...@nospam.nospamwrote in message

news:%2****************@TK2MSFTNGP06.phx.gbl...
Thanks Mike,
No joy though. Still get the same error.
"Mike Placentra II" <nothingsoriginalontheinter...@gmail.comwrote in
messagenews:11*********************@r29g2000hsg.go oglegroups.com...
>I don't have any trouble using the <ajax:ScriptManager /control
instead of <ajaxToolkit:ToolkitScriptManager /with AJAX Toolkit. All
of the AJAX Toolkit controls work with the regular one for me. I
didn't realize there was an <ajaxToolkit:ToolkitScriptManager />.
Try the <ajax:ScriptManager /instead (or it might be a different XML
namespace for you depending on how you have it configured).
-Michael Placentra II
On Oct 4, 5:55 pm, "Jason" <JasonJa...@nospam.nospamwrote:
But after adding this line of code:
><ajaxToolkit:ToolkitScriptManager runat="Server" ID="ScriptManager1" />
>I see a JavaScript error that says "'Sys' is undefined".
>Is there something else I am not including. This is a web application
project, not a website project, if that makes a difference.
>Thanks
Jason- Hide quoted text -

- Show quoted text -
I had to do the same thing for adding ajax to my first project a few
weeks ago!!

Oct 5 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Frogman | last post by:
Hi, How do you embed an existing application as a module in a CMS (i.e. phpNuke, Xoops.) Let's say I want to modularize phpMyAdmin in phpNuke, is there a simple way to do this? I can design...
1
by: pmud | last post by:
Hi I need to connect an existing application to an SQL database. How to go about doing that coz its an application created by a third party & I dont even know how or in what programming language...
1
by: Lucas Tam | last post by:
Hi all, I have an existing application that I would like to expose via remoting. All the examples I have seen online only show how to create a new application and expose it to remoting. Is...
1
by: luvic.vangool | last post by:
Hi, I am looking for a suitable Ajax Telnet Application. The main reason for this is I have a training company client that needs to allow access to their training systems via completely vanilla...
3
by: Robert Scheer | last post by:
Hi. I think I have some conceptual questions here. I have an asp.net web application up and running and now I intend to use Atlas on some of my pages. I have read that after installing Atlas, I...
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
0
by: arlene5781 | last post by:
Hi Guys, please help.. Im having a problem in getting the Handle/Process ID in a existing application. Here's the existing code, i wonder how to get the &H4D7 and 1242. Do you have a tool for this?...
4
by: Alex | last post by:
Hello, This is a follow-up to my earlier post about having issues with our application pool recycling. We currently use Session State InProc, but if I were to choose to move the existing...
1
by: Piotr Nowak | last post by:
Hi, Currently im skimming throgh Web Client Software Factory (http://www.codeplex.com/websf). I know, it could be great for complex apps, but i have one problem. I use Telerik Controls...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.