I ‘m learning ajax and have created some pages and practiced using the ajax controls. I’m using visual studio 2007 on a windows xp machine with .net 3.5 . The site I’m practicing with is the ajax sample web site that I’ve downloaded. I’m just adding
pages to this site as practice. Using a tag prefix of ajaxToolkit
I have read on this site and serveral other sites that you can register the assembly and the tag prefix by placing code in the web config, so Between the assemblies Tags of the we congif I entered
Right click in tool box, click choose items, then browse to the folder where ajaxcontroltoolkit.dll is present. select it and press ok then the ajax control toolkit controls will be in the tool box, then you can drag drop controls from toolbox on the form.
configuration changes will automatically made in web.config and on the aspx page you don't need to do extra.
If you want to use update panel then in tool box locate the section which says ajax extensions and drop update panel on the form.
Ask again if not clear.
Please mark as answer if it helps you.
Abdul Rauf
Please Mark As Answer, if it solves your problem. So that it might be useful for others. FAQs
Thanks for the response. The only reason I care about the tag prefix is because I am going through some of the tutorials on the asp website and in the tutorials the ajax controls have the tag prefix “ajaxToolkit” and I would like to follow along with the
tutorial with out constantly have to change the tag prefix form “asp” to “ajaxToolkit”. The tag prefix of ajax controls is confusing – I seen the prefix “cc1” as well as “ajaxToolkit”. I have now idea what the standard is.
I tried following you instructions and I created a new web site and the first thing I did was add the tag prefix to the web.config
I then deleted the Ajax control tools tab and recreated the ajax tools tab and then selected choose items and went out and selected the AjaxControlToolkit.dll and all of the controls were re-added to the Ajax Controls Tool Tab.
When I created a page and added a script manager and a combo box I got:
If I remove the register asembly at the top of the page and change the tag for the script manager and combobox prefix from “asp” to “ajaxToolkit” it works, so apparently the tag prefix is being picked up from the web.config. But If a add another ajax control
I get the register assembly at the top of the page again trying to register the tag prefix ‘asp’ for the ajax controls.
I guess the only problem I have is the Register assembly for "asp" being added to the top of the page every time I add an ajax control. Any ideas on how to prevent this from happening?
None
0 Points
7 Posts
Register AJAX toolkit in web config
Dec 27, 2010 10:57 AM|GEM1204|LINK
I ‘m learning ajax and have created some pages and practiced using the ajax controls. I’m using visual studio 2007 on a windows xp machine with .net 3.5 . The site I’m practicing with is the ajax sample web site that I’ve downloaded. I’m just adding pages to this site as practice. Using a tag prefix of ajaxToolkit
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
I have read on this site and serveral other sites that you can register the assembly and the tag prefix by placing code in the web config, so Between the assemblies Tags of the we congif I entered
<add assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
And between the <controls> tag the web config I added
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
This didn’t work because when an ajax control is added from the toolbox get asp tag
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:ComboBox ID="ComboBox1" runat="server">
</asp:ComboBox>
Can someone help me with this?
Member
220 Points
135 Posts
Re: Register AJAX toolkit in web config
Dec 27, 2010 11:47 AM|habdulrauf|LINK
Right click in tool box, click choose items, then browse to the folder where ajaxcontroltoolkit.dll is present. select it and press ok then the ajax control toolkit controls will be in the tool box, then you can drag drop controls from toolbox on the form. configuration changes will automatically made in web.config and on the aspx page you don't need to do extra.
If you want to use update panel then in tool box locate the section which says ajax extensions and drop update panel on the form.
Ask again if not clear.
Please mark as answer if it helps you.
Please Mark As Answer, if it solves your problem. So that it might be useful for others.
FAQs
None
0 Points
7 Posts
Re: Register AJAX toolkit in web config
Dec 27, 2010 01:42 PM|GEM1204|LINK
Thanks for the response. The only reason I care about the tag prefix is because I am going through some of the tutorials on the asp website and in the tutorials the ajax controls have the tag prefix “ajaxToolkit” and I would like to follow along with the tutorial with out constantly have to change the tag prefix form “asp” to “ajaxToolkit”. The tag prefix of ajax controls is confusing – I seen the prefix “cc1” as well as “ajaxToolkit”. I have now idea what the standard is.
I tried following you instructions and I created a new web site and the first thing I did was add the tag prefix to the web.config
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
I then deleted the Ajax control tools tab and recreated the ajax tools tab and then selected choose items and went out and selected the AjaxControlToolkit.dll and all of the controls were re-added to the Ajax Controls Tool Tab.
When I created a page and added a script manager and a combo box I got:
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">
</asp:ToolkitScriptManager>
<asp:ComboBox ID="ComboBox1" runat="server">
</asp:ComboBox>
At the top of the page I also got
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
If I remove the register asembly at the top of the page and change the tag for the script manager and combobox prefix from “asp” to “ajaxToolkit” it works, so apparently the tag prefix is being picked up from the web.config. But If a add another ajax control I get the register assembly at the top of the page again trying to register the tag prefix ‘asp’ for the ajax controls.
I guess the only problem I have is the Register assembly for "asp" being added to the top of the page every time I add an ajax control. Any ideas on how to prevent this from happening?
Thanks
All-Star
48393 Points
12161 Posts
Re: Register AJAX toolkit in web config
Dec 27, 2010 10:29 PM|chetan.sarode|LINK
1. Install the Ajax Control Toolkit as described in: http://www.asp.net/ajaxlibrary/act.ashx
2. Modify the web.config by adding the entries below.
a. <add assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
Goes between <assemblies></assemblies> tag.
b. <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
Goes between <controls></controls> tag.
If you’ve installed some other version of the tool kit then make sure to replace a value of the Version attribute of both entries above.
To get the version just right click on the AjaxControlToolkit.dll and get the value of Assembly Version.
Here is what you’d need to use an ajax control on your page.
http://forums.asp.net/t/1255216.aspx
http://forums.asp.net/t/1262592.aspx
Team Lead, Product Development
Approva Systems Pvt Ltd, Pune, India.