Using ASP.NET AJAX Library
by
on March 9th, 2010 at 09:47 AM (569 Views)
ASP.NET AJAX library is currently Version 0911 Beta. The toolkit can be downloaded from ASP.NET Ajax Library
I have previously used the AJAX Toolkit extensions in my ASP.NET projects and thought on my current project I'd see if there was an update.
Finding the ASP.NET AJAX library beta, I thought I'd give this a go. However, I did come across a couple of trip-ups that I thought I'd post here as I couldn't find much info when I googled it.
So, to get the AJAX Library to work, I did the following.
1) Copy the AjaxControlToolkit.dll AND System.Web.Ajax.dll to your bin folder.
2) Reference the AjaxControlToolkit in your web.config
I used the same "asp" prefix.Code:<pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /> </controls> </pages>
3) In either your master page (or your content page) remove any <asp:ScriptManager /> reference and change it to
<asp:ToolkitScriptManager />. I kept the other properties identical, so ended up with:-
I include mine on my master page, but you could just include it on any pages you want to use the toolkit.Code:<asp:ToolkitScriptManager ID="MasterScripts" runat="server" EnablePartialRendering="true"> </asp:ToolkitScriptManager>
From here you should be good to go. For example, to use the calendar extender, just have:-
If I find any other problems with using the new beta version, I'll post some more info in my blog.Code:<asp:CalendarExtender ID="ceDateField" runat="server" TargetControlID="txtDateField" Format="dd/MM/yyyy" PopupButtonID="imgMyCalImage" CssClass="mycalendar" Animated="false" />
Hope that helps someone.








Email Blog Entry