Contents tagged with ASP.NET AJAX
-
Slides and Code for my Silverlight and ASP.NET AJAX Integration Talk
-
Speaking on Silverlight and ASP.NET AJAX Integration at Desert Code Camp
-
ASP.NET AJAX Script Library Patch for iPhone 1.01 Software Update
Matt Gibbs recently posted about an update to the ASP.NET AJAX Script library that fixes functionality broken when trying to run ASP.NET AJAX-enabled pages in the iPhone's Safari browser when the 1.01 software update has been applied to a phone. He posts a step-by-step guide to using the scripts and explains what was changed in case you're interested.
-
Online JavaScript Compression Tool
Compressing JavaScript code is useful when you want to minimize the size of files that get downloaded to the client. This is especially true with AJAX applications that may rely on several scripts to function properly.
-
How To: Create an ASP.NET AJAX Toolkit Extender Control to Extend a GridView
In a previous post I showed examples of how CSS and JavaScript code could be used to freeze the header row of a GridView control and add scrolling capabilities for Internet Explorer and Firefox. Here’s an example of a GridView with a frozen header:
In this post I’m going to discuss how to package up CSS and JavaScript files into a custom control that can be used on the server-side to extend the GridView. Doing this allows you to continue using the standard GridView that ships with ASP.NET 2.0 in applications while extending it’s functionality through a custom extender control.
There are multiple ways to go about creating an AJAX control extender. You can use native classes available in the ASP.NET AJAX Extensions to build a control that would get the job done. However, doing so requires that you write custom code to map server-side properties to client-side properties which isn’t hard. Additional details on how to do this can be found in the ASP.NET 2.0 Professional AJAX book Matt Gibbs and I co-authored. You can download the code from the book here if you’d like to see the sample code (see the chapter 11 code).
To simplify things as much as possible, I’m going to discuss how to build a custom control that is based upon the ASP.NET AJAX Control Toolkit available from http://www.codeplex/com/AtlasControlToolkit (that’s not a typo, they never changed the Atlas name to AJAX in the URL for some reason). The ASP.NET AJAX Control Toolkit provides a base class named ExtenderControlBase along with several attribute classes that minimize the amount of code that has to be written create a control extender. Here's the steps I went through to make the control.
-
AlbumViewer Application Now Runs with Silverlight and ASP.NET AJAX
With the release of Microsoft's Silverlight 1.0 I updated the Amazon.com AlbumViewer application that I originally created using WPF/E and ASP.NET AJAX back in December.
The updated code can be downloaded here and you can view a live version of the application here. -
Freeze ASP.NET GridView Headers by Creating Client-Side Extenders
Lately I've been working on a pet project where I needed to freeze a GridView header so that it didn't move while the grid records were scrolled by an end user. After searching the Web I came across a lot of "pure" CSS ways to freeze a header. After researching them more they tend to rely on a lot of CSS hacks to do the job and require HTML to be structured in a custom way. I also found a lot of custom GridView classes (another one here), and more. Some of the solutions were really good while others seemed a bit over the top and required a lot of custom C# or VB.NET code just to do something as simple as freezing a header. Freezing a header requires CSS and potentially JavaScript depending upon what needs done. Regardless if CSS or JavaScript are used, these are client-side technologies of course. I started to write my own derivative of the GridView class but quickly realized that it made more sense to use the standard GridView control and simply extend it from the client-side. An example of what I was after is shown next:
-
Using the ASP.NET AJAX ScriptMethodAttribute to Return XML Data
Web Services provide a convenient way to pass data between AJAX applications and a server. ASP.NET AJAX provides an excellent infrastructure for Web Service integration into AJAX applications and makes it all cross-browser through incorporating JSON into the mix. While JSON is compact and a very good fit for AJAX applications, there may be times where it's easier or more convenient to pass back raw XML to an AJAX client for processing. This is especially true if the browser provides robust XML parsing APIs like Internet Explorer 5+. For example, you may have a Web Service that obtains RSS data and returns it as an XmlDocument or XmlElement object.
-
Aborting AJAX Requests
-
Updated: List of AJAX Automated Testing and Debugging Tools
While there are a lot of testing tools out there to look for bugs, test a Website's scalability and perform unit tests, precious few seem to handle automating the testing of AJAX applications. As a result, I wanted to start a list of tools that support automated testing of AJAX applications as well as debugging. If you have other tools or applications you know of or something listed is out of date please add a comment to the blog and I'll get the information added/updated.