Hi janaagaard,
janaagaard:
1) Why do I have to create a new "ASP.NET AJAX Web Site"? Will this somehow link the toolkit til AJAX-enabled web sites? And how would this work if I have an existing web site, where I would like to use some of these controls - do I just follow the instructions on how to modify the Web.config file to enable AJAX?
Well, when you start your website from that template, your web.config will be configured to use ajax. Also, in your toolbox there will be the ajax extentions (updateprogress, updatepanel, scriptmanager, ...)
Keep in mind that an AJAX-website is NOT an ajax-Toolkit-website. You have to see the ajax extentions as a basic layer which you must have in order to use the toolkit. But you can have an ajax-enabled website without using any of the toolkit controls, this works just fine.
When you have an existing website, you have to modify your web.config to make the website ajax-enabled. You can to this by following the instructions.
You could also add the 2 ajax dll's (system.web.extentions.dll & system.web.extentions.design.dll) to the bin folder of your website and add the following code right underneath the <system.web> of the web.config:
<!--AJAX ENABLE WEBSITE-->
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<!--END AJAX ENABLING-->
janaagaard:
2) The guide tells me to browse to the SampleWebSite folder and point to the AjaxControlToolkit there. But don't I have to include the dll in my project so that it will get published to the production web server, when I publish my web site?
Don't reference to the dll of the sample website. I just copy that dll (=AjaxControlToolkit.dll) into the bin-folder of my website.
Well, the copying isn't really necessary. When you have the ajaxControlToolkit-controls in your toolbox of the developmentEnvironment, than when you drag a toolkit control on the website, a toolkit dll will be placed inside your bin-folder. So there is actually no need to do this explicitly.
janaagaard:
3) Will this enable the control toolkit for all my web sites? ("You can now use the included sample controls in your web sites!")
Well, I didn't read the guide, are they telling you how to install the toolkit dll into the GAC (=global assembly cache)? When a dll is placed over there, all your sites will be able to reference that dll. So it doesn't need to be stored in each site seperatly. You just have to reference it right in your web.configI guess. (you should google on asp.net and gac, maybe you'll find more info on that topic)
janaagaard:
4) What are the Control Toolkit Templates? Is this the different controls, e.g. Accordion, AlwaysVisibleControl, Animation, etc.?
As I already mentioned, you have the basic ajax controls. These are available to you when you install the asp.net ajax 1.1. These basic controls contain the updateprogress, updatepanel, scriptmanager, and some others, but that's it.
Then you have the AjaxControlToolkit.dll. This dll contains all the extended ajax controls, like the validators, extenders, calendar control, autocompleters, and so on.
Remember when you asked, why do I need to create a new ASP.NET AJAX Web Site?. Well, then you just make a new website from the "AJAX-enabled website"-template. Within this template you already have the right web.config, the right references to the ajax extention dlls, and in the Toolbox you also see the ajax extentions.
When you create a new website from a Control Toolkit Template, then you create a new site from an "Ajax-Control-Toolkit-Enabled website"-template. Within this template, all is set-up to get started with the toolkit right away. I mean, the web.config is ajax enabled; you have the ajax-extentions in the toolbox; you have the toolkit-Controls in the toolbox, etc
I hope all is a bit clear to you.
If you have any further questions/remarks please do so.
Kind regards
Wim
No comments:
Post a Comment