Ajax ToolkitScriptManager help!

inkedGFX

Well-known member
Joined
Feb 2, 2013
Messages
142
Programming Experience
Beginner
I am working on a website and one of my pages I would like to use the Ajax CalendarExtender control.....I used nuget to get the ajax toolkit dll installed in my project...but when I try to add the calenar extender or the toolkitscriptmanager to the page ...nothing is added..Im using Visual Studio 2013

I would show the html code but it is alot of code....

any help will be appreciated.

Thank You
-InkedGFX
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
823
Location
Norway
Programming Experience
10+
I used nuget to get the ajax toolkit dll installed in my project...but when I try to add the calenar extender or the toolkitscriptmanager to the page ...nothing is added..
After installing did you add the library to Toolbox? how to add ajaxcontroltoolkit to toolbox in vs 2012 - Stack Overflow

*edit*
I think I see what you mean, granted you are trying to use Toolbox. I recently installed VS 2013 myself, and is now having all sorts of trouble myself adding ACT stuff from Toolbox to web forms, this is both in Web Application and Web Site projects. It could be buggy (either VS or the ACT library), or perhaps a problem with project and Toolbox referencing different copies of library. I can add CalendarExtender and ToolkitScriptManager from Toolbox occationally, but mostly not.
However you should be able to add these manually in code, but you may have to register the tag prefix in page (even if it is already registered in web.config).
 

inkedGFX

Well-known member
Joined
Feb 2, 2013
Messages
142
Programming Experience
Beginner
when I add the calendar extender to the asp page and try to add the scriptmanager , when I test the page in the browser I get an error "cannot have 2 instances of the scriptmanager" but I only have 1 scriptmanager on the page......not sure why Im getting this error.

-InkedGFX
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
823
Location
Norway
Programming Experience
10+
Do distinguish between ScriptManager component that comes with VS 2013 and the ACT ToolkitScriptManager component. They are not the same, but similar, and they would be in conflict if in same page, that includes master page if you use that. New web site/application templates includes a master page using ScriptManager, and according to research you can replace ScriptManager with ToolkitScriptManager if you are otherwise using ACT.

New 'Empty' web site/application may be a better start than the new default ones, that are now really crammed with master/content pages, login system, lots of references and what not. It's a lot to handle when starting out, and could interfere with your current development tryouts.
 

inkedGFX

Well-known member
Joined
Feb 2, 2013
Messages
142
Programming Experience
Beginner
yes, you are correct I changed the "scriptmanager" in the master page to "toolkitscriptmanager" then added this "<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>" to the top of the master page and each page that uses a ajax component....and everything is working now.

thank you for your help!

-InkedGFX
 
Top Bottom