Thanks everyone who came to my Ajax talk tonight at the .NET Developers Association! The slides and demos from the talk can be downloaded by clicking the following link:
You need Visual Studio 2010 to view the code samples. The first project, named Demos, contains the following samples:
ASPAjax4
1_CompositeScripts.aspx – Demonstrates how to use the ScriptManger to combine, compress, and cache JavaScript files automatically.
2_EnableCdn.aspx – Demonstrates how to retrieve ASP.NET Ajax framework scripts from the Microsoft Ajax CDN automatically.
jQuery
1_Selectors.aspx – Demonstrates how to use jQuery selectors
2_WebForms.aspx – Demonstrates how to use the client tablesorter plugin with ASP.NET Web Forms.
3_MVC.aspx – Demonstrates how to use jQuery animation and the templating plugin with ASP.NET MVC.
4_OData.aspx – Demonstrates how to use jQuery with the Netflix API by using JSONP and odata.
5_Templating.aspx – Demonstrates how to use jQuery client templating.
6_TemplateConditionals.aspx – Demonstrates how to use logic within a jQuery template.
7_DataLinking.aspx – Demonstrates how to perform data-binding in jQuery.
8_Converters.aspx – Demonstrates how to defines converters that work with data-binding.
The second project, named ACT_Tools, illustrates how to use the Microsoft Ajax Minifier and the JSBuild JavaScript preprocessor. When you perform a build in Visual Studio, all JavaScript and CSS files are minified automatically. Furthermore, any *.pre.js file is processed using the JSBuild preprocessor and the output is saved to the ScriptOutput folder. Select Show All Files in Visual Studio to see the generated results of the minifier and the preprocessor.
The jQuery UI team just added jQuery UI to the Microsoft Ajax Content Delivery Network (CDN). Thanks to them, you can start using jQuery UI in your ASP.NET websites by linking to jQuery UI at the following address:
You can start using the CDN now for free. No registration is required.
Using jQuery UI from the CDN can substantially improve the performance of your production ASP.NET websites. The Microsoft CDN is composed of servers distributed around the world. When users request a page from your website, the users can retrieve jQuery UI from a server located geographically close to them.
In addition, because browsers cache JavaScript files relative to a domain, serving jQuery UI from a CDN enables your website users to avoid downloading jQuery UI when visiting multiple websites. If you visit two websites that both use jQuery UI from the Microsoft CDN then the jQuery UI library only needs to be downloaded once.
Learn more about the Microsoft Ajax CDN by visiting the following website:
This website is being updated with the location of all of the jQuery UI library files.
Using the jQuery UI Datapicker from the Microsoft Ajax CDN
The jQuery UI Datepicker (http://jqueryui.com/demos/datepicker/) enables you to easily display a pop-up calendar. Here’s a complete code sample of using this plugin: Listing 1 – Using the jQuery UI Datepicker
When you open this page, and click (or tab) inside the input field, you get a popup calendar:
Notice that the page above includes the following link to a jQuery UI theme:
All of the standard jQuery UI themes are hosted on the Microsoft Ajax CDN. I am using the standard jQuery UI Redmond theme – naturally :).
Additional jQuery Plugins on the CDN
We are inviting the authors of the top jQuery plugins to add their plugins to the CDN. Pay attention to this blog over the next few months to learn about the new jQuery plugins added to the CDN.
I’m super excited about having jQuery UI on the Microsoft CDN. Having jQuery UI on the CDN will make it easier for ASP.NET developers to build ASP.NET applications that support rich and interactive user interfaces.