JavaScript

Visual Studio 2010 Beta 2 was released this week and one of the first things that I hope you notice is that it no longer contains the latest version of ASP.NET AJAX. What happened? Where did AJAX go? Just like Sting and The Police, just like Phil Collins and Genesis, just like Greg Page and the Wiggles, AJAX has gone out of band! We are starting a solo career. A Name Change First things first. In previous releases, our Ajax framework was named ASP.NET AJAX. We now have changed the name of the framework to the Microsoft Ajax Library. There are two...

Posted Wednesday, October 21, 2009 9:21 AM

Last night, Scott Guthrie announced that the ASP.net team published a free tool that enables you to improve the performance of your Ajax applications by reducing the size of its JavaScript files. The new tool is named the Microsoft Ajax Minifier. You can read Scott Guthrie’s announcement here: http://weblogs.asp.net/scottgu/archive/2009/10/15/announcing-microsoft-ajax-library-preview-6-and-the-microsoft-ajax-minifier.aspx And you can download and install the free tool from the CodePlex website here: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34488 In this blog entry, I explain how you can take advantage of the Microsoft Ajax from the command-line and when you are using Visual Studio. Overview of the Microsoft Ajax Minifier The Microsoft Ajax Minifier was created by Ron Logan (who is clearly...

Posted Friday, October 16, 2009 1:25 PM

We just released a new version of the AJAX Control Toolkit today. This new version includes significant bug fixes and two new controls. You can download the latest version – the September 30th release – from the CodePlex website right here: http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33804 Read the following tutorial to learn how to install the AJAX Control Toolkit: http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-47-cs.aspx In this blog entry, I provide a brief walkthrough of the two new controls included with this release and list the new bug fixes. Seadragon Control The Seadragon control enables you to pan, zoom, and make an image full screen. The control performs all of these fancy image effects using...

Posted Thursday, October 01, 2009 8:44 AM

The AJAX Control Toolkit is an incredibly popular set of controls that enable you to easily add JavaScript functionality to an ASP.NET application. The AJAX Control Toolkit has consistently been one of the top three most popular downloads from CodePlex since the birth of CodePlex (see http://www.CodePlex.com). Lately, we’ve been thinking hard about methods of improving the quality of the AJAX Control Toolkit controls. We want to improve the quality of the AJAX Control Toolkit controls so that they match the very high standards of quality of the official ASP.NET framework controls such as the GridView and TextBox controls. In discussions...

Posted Saturday, July 04, 2009 7:35 PM

I’ve been investigating different unit testing frameworks for JavaScript lately and I stumbled onto FireUnit. FireUnit is a unit testing framework created by John Resig (of well-deserved jQuery fame) and Jan Odvarko. In this blog entry, I provide a brief overview of the FireUnit testing framework. In particular, I explain how you can use FireUnit to unit test JavaScript code. Installing FireUnit FireUnit is implemented as a FireFox extension. This is both bad and good. First, the bad news. You cannot use FireUnit with Internet Explorer, Safari, Chrome, or any other browser than Mozilla Firefox. Here’s the good news. FireUnit extends Firefox with...

Posted Monday, May 18, 2009 9:45 AM

Thank you to everyone who came to my jQuery and ASP.NET AJAX PDC talk!  As promised, I've added a link to the demo code from the talk to this blog entry. There are three separate downloads: jQuery Demos -- Contains sample code that demonstrates how to use jQuery selectors, animations, and plug-ins. PhotoGallery Application -- Contains a simple Photo Gallery application in which photos are fetched by making Ajax calls to a web service. Demonstrates using the new Client Side Templates features of ASP.NET AJAX. MovieDatabase Application -- Contains an ASP.NET MVC application that uses jQuery and Ajax. Demonstrates how to build applications that...

Posted Wednesday, October 29, 2008 11:51 PM

Mark your calendars and come to my jQuery in ASP.NET talk at PDC. It looks like my talk is scheduled for Tuesday (10/28/2008) at 5:15pm. You can still register for the PDC here: http://www.microsoftpdc.com/ I'm really excited about the new possibilities that jQuery, in combination with the new features of the ASP.NET AJAX framework, opens up for building Ajax applications. My talk discusses using jQuery in the context of both ASP.NET Web Forms and ASP.NET MVC applications. Here's the talk description:   Introducing jQuery in ASP.NET jQuery is an open source JavaScript library that has a passionate following among Ajax developers. Microsoft is integrating the...

Posted Wednesday, October 15, 2008 1:24 PM

In this tip, I explore one approach to building Ajax applications with ASP.NET MVC. I show how you can use view data when building Ajax applications with ASP.NET MVC in the same way as you would use view data when building server-side application. I demonstrate how to create a custom HTML Helper that renders client view data. One of the primary benefits of building an ASP.NET MVC application is that it enables you to build web applications that support a sharp separation of concerns. This sharp separation of concerns enables you to build applications that are highly testable and highly adaptable...

Posted Wednesday, October 08, 2008 4:44 PM

In this tip, you learn that JavaScript Injection attacks are much more serious than you might think. I show you how to do very evil things with an ASP.NET MVC website using a JavaScript Injection attack and then I explain an easy way to prevent this type of attack. When you collect form data from a visitor to your website, and you redisplay that form data to other visitors, then you should encode the form data. Otherwise, you are opening your website to JavaScript Injection attacks. For example, if you are creating a discussion forum, make sure that you encode the forum...

Posted Monday, June 23, 2008 11:24 PM

The goal of the blog entry is simple: I want to understand everything happening under the covers when you take advantage of ASP.NET AJAX inheritance. So, let’s start with a simple code sample: Listing 1...

Posted Thursday, March 06, 2008 5:53 AM