Ajax Control Toolkit July 2011 Release - Now on NuGet
Say what you will about the Ajax Control Toolkit. Some like it, some don't, but it got 1.15 MILLION downloads last year. Is the ACT dead? Not yet, and there's ongoing work around WebForms, jQuery and an ACT style of programming. More on this soon.
There's like 40 different controls in the Ajax Control Toolkit. They continue to be updated and have cross-browser support. The first release this year added IE9 support. This new July 2011 release adds a a new HTML Editor and more complete browser support including (from Stephen Walther's blog):
The HTML Editor Extender works on all modern browsers including the most recent versions of Mozilla Firefox (Firefox 5), Google Chrome (Chrome 12), and Apple Safari (Safari 5). Furthermore, the HTML Editor Extender is compatible with Microsoft Internet Explorer 6 and newer.
How do you use it? Now that the AjaxControlToolkit is in NuGet, it's easy either from the Package Manager Console, or from the GUI.
You COULD register the AjaxControlToolkit at the top of your page:
<%@ Register TagPrefix="act" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%>
But the NuGet package already added that to your web.config!
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
Although I think the prefix should be "act," so I'll change it. Then, just use the controls on your page in ASP.NET WebForms. For example, here's how you turn a standard TextBox into a Color Picker:
<act:ToolkitScriptManager ID="manager" runat="Server" />
<asp:TextBox ID="txtColorPicker" runat="server" />
<act:ColorPickerExtender TargetControlID="txtColorPicker" runat="server" />
The ToolkitScriptManager only needs to be on the page once.
This is just one example. Check out the dozens of controls at the Ajax Control Toolkit Sample site.
Enjoy!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Having backward compatibility AND nuget is pretty sweet for these types of legacy apps!
Could it be that some parts of the ACT require the ToolkitScriptManager, while some do not and therefore the documentation advises you always use it?
Ajax Toolkit Editor Control in ASP.Net
Thanks
Comments are closed.