Monday, March 26, 2012

ASP.NET AJAX 1.0 Beta - Unable to use asp:ScriptManager in Control Toolkit and samples

Hi All,

I have uninstalled all the ATLAS related things using “Add or Remove Programs” and installed ASP.NET AJAX 1.0 Beta in the following way

Step 1 – Download and installed ASP.NET AJAX 1.0 Beta

Step 2 – Download and installed ASP.NET AJAX CTP

Step 3 – Download the ASP.NET AJAX Samples

Step 4 – Download the ASP.NET AJAX Control Toolkit

Now I can create new websites but I am unable to run the Samples and Control tool kit samples. I am getting JavaScript errors 'Sys' is undefined, Expected '}' etc.

I have even tried changing asp:ScriptManager to aspatlas:ScriptManager as mentioned in some blogs

Anyone facing such problems ?

Did you build the toolkit solution? I think by default when you download the source that you have to before you run the samples as the bin folder of the sample website does not have the toolkit dll...


Thanks Jodywbcb for your quick reply.

I have build the solution before running the toolkit. Also for the sample applications (Contacts, SimpleList and TaskList) I have copied Microsoft.Web.Preview.dll from the ASP.NET AJAX CTP installation directory (%Program Files%\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\) to the Bin directory of each sample application.

None of the samples are working in my system. But I can run the tool kit fromhttp://ajax.asp.net/ajaxtoolkit/ in my system.

I also tried reinstalling, restarting etc... No hope...


No problem... Can you post a a screenshot or capture of the error message you are recieving?

Sounds to me like for whatever reasons you are not able to GAC the Microsoft.Web.Extensions.dll for whatever reasons .. if you have the preview then you should have that dll ( its in the same folder you copied the preview stuff from btw if not revisit the Ajax announcement page and do step 1...). So try copying the dll I listed to the AjaxControlToolkit\SampleWebSite\Bin - it will search for it there if not in the GAC and let me know if you have any issues from that point. If you are installing the kit on a laptop / desktop that actually does set restriction that may be the cause - but copying the dll to you bin should allow it to run as there is nothing explicitly documented with this release that it needs to be GACed...


Error is 'Sys' is Undefined, 'Type' is Undefined, Expected '}'. Also I am unable to use intellisense in VS 2005 forasp:ScriptManager and other ajax elements. The error is "Element ScriptManager is not a known element"

Microsoft.Web.Extensions.dll is already there in GAC. Even after coping it to the BIN folder error exists.


Ref:My blog and see if anything helps you - the toolkit example does work as intended if everything is properly installed but there are workarounds...

I have tried running toolkit samples in 3 different systems and got the following observations

1. I have copied the AjaxControlToolkit folder to all the 3 systems and installed Microsoft.Web.Extensions.dll in GAC

2. I can successfully build and run the application using VS 2005.

3. When I open any one page (Any Ajax sample page)first time it will work

4. When I open some other page I will get the JavaScript error I mentioned

5.After that none of the page will work (Including the first page which successfully executed) in that system


I have the exact same problem with the samples.

I've noticed that the web.config has a namespace entry under system.web -> pages -> controls with tagPrefix="asp" for both the preview and extensions dlls, so maybe the problem is related to those dlls.


Could it be that you're missing some javascript files?

Re: Intellisense not working, did you try removing all the Atlas components from Visual Studio and re-adding the new 1.0.6x NET Framework Components? Also, make sure you have the new files in Bin folder.


Do I need to explicitly add any JavaScript files for the toolkit? New dll's I copied to the BIN folder.

Is there anyone who is successfully using the toolkit? I have tried installing it in more than four systems (In all the systems ATLAS was there)

The very first sample I can run, After that no hope to run any sample in that system.


Gary A. Stafford:

Re: Intellisense not working, did you try removing all the Atlas components from Visual Studio and re-adding the new 1.0.6x NET Framework Components? Also, make sure you have the new files in Bin folder.

I've installed it on a machine with a fresh VS2005 installation, meaning no Atlas component.

I've copied the 'Preview' and 'Extensions' dlls to the bin folder, if thats what you meant.


It seems that the caching issue solved in the ASP.NET AJAX 1.0 release. Now there is no script error!! Smile

Thanks

No comments:

Post a Comment