Get Yahoo’s HTTP performance analysis tool

AJAX, ASP.NET, Performance By . Posted July 25, 2007

YSlow, Yahoo’s previously internal-only HTTP profiling tool, has been released to the public. It extends FireBug to analyze a page and provide an optimization checklist.

After experimenting with it for a bit today, I think it will quickly become as integral to my performance tuning as FireBug itself.

Get it here: http://developer.yahoo.com/yslow/

Display data updates in real-time with AJAX

AJAX, ASP.NET, Performance, UI By . Updated October 15, 2008

Example image of Digg Spy.

I’ve recently noticed the real-time “spy” feature popping up on more and more sites. Though it’s often a huge time waster, I can’t help but love the feature. It’s a great example of AJAX leveraged to do what it does best. It struck me that an ASP.NET AJAX implementation would be an excellent use of page methods for efficiency and __doPostBack() to trigger an UpdatePanel refresh. So, I decided to put together a proof of concept, using the ASP.NET AJAX framework.

To create a fully functional example, several things need to be done:

  • Choose a data source to “spy” on.
  • Build an interface to add rows, for testing.
  • Display that data in a row-based format.
  • Create a method to find the most recent row of data.
  • Use that method to asynchronously monitor row updates.
  • Refresh stale data when additions are detected.

Click here to read the rest of this post »

How to improve ASP.NET AJAX error handling

AJAX, ASP.NET, CSS, UI By . Updated August 29, 2007

AJAX error message on the ASP.NET forums

If you’ve done much ASP.NET AJAX development, you’re no doubt familiar with JavaScript alert errors similar to the one pictured above. This particular one occurs on the official ASP.NET forums in FireFox, if you try to navigate away from viewing a user profile before the Recommended Reading panels asynchronously load.

Not only is the error message of “…” completely meaningless, but it blocks your intended navigation away from the page until you’ve dismissed the alert window. Hopefully, someone at Telligent will read this, because the ASP.NET AJAX framework gives us an easy way to replace the annoying JavaScript alerts and vastly improve the usability of our applications.

Click here to read the rest of this post »

Easily refresh an UpdatePanel, using JavaScript

AJAX, ASP.NET, JavaScript, UI By . Updated March 19, 2008

I’ve noticed a lot of discussion lately regarding methods to refresh an UpdatePanel via client script. This is very easy on the server side, of course. You can just call UpdatePanel.Update(). However, on the client side, the most common solutions I’ve been seeing just don’t feel right.

Many will advise you to use a hidden button control inside the UpdatePanel, manipulated via button.click(), to trigger a partial postback of the UpdatePanel. While it does work, I never have been able to get past the kludgey nature of that solution.

Click here to read the rest of this post »

Why ASP.NET AJAX UpdatePanels are dangerous

AJAX, ASP.NET, Performance By . Updated April 23, 2008

If you’re like me, it’s hard to resist the lure of tossing a half dozen UpdatePanels on every page and reveling in AJAX goodness. The UpdatePanel makes AJAX trivially easy for anyone to implement, even without knowledge of what’s actually going on behind the scenes.

Unfortunately, that very lack of transparency regarding the mechanics of the client/server exchange makes it all too easy to shoot yourself (or your application) in the foot. Let me give you an example that you’re probably familiar with by now, and thoroughly sick of seeing:

Click here to read the rest of this post »

User availability check usability improvements

AJAX, ASP.NET, CSS, UI By . Updated October 15, 2008

This is a follow-up post, building on the foundation laid in ASP.NET AJAX username availability check. In this post, I assume you’ve read and understood the first post.

After originally implementing AJAX username availability checking in my applications, I noticed an edge case scenario that replayed itself too often to ignore. The availability check could potentially take longer than a particularly fast user would need to complete the form. To avoid any trouble in that scenario, I wanted to add a progress indicator to the checking process and disable the submit button’s until an available username was selected.

Click here to read the rest of this post »

ASP.NET AJAX username availability check

AJAX, ASP.NET, CSS, UI By . Updated October 10, 2008

An available and unavailable username exampleWhen you have a name as common as mine, you run across the entire gamut of schemes to deal with username availability in membership systems. By availability, of course I mean denial and rejection. Out of all of the ways that I’ve had “Dave” rejected, inline AJAX verification is definitely the least annoying. Wanting to be less-annoying myself, I’ve added the same functionality to my ASP.NET AJAX sites. Let me show you how I did it.

Click here to read the rest of this post »

The easiest way to break ASP.NET AJAX pages

AJAX, ASP.NET By . Updated June 28, 2007

Use Response.Write().

If you’re worried that might not bring your website to its knees reliably enough, be especially sure to use Response.Write in code that’s executed during partial postbacks. It’s that easy!

Emitting JavaScript probably comprises the vast majority of Response.Write uses in ASP.NET projects today. So for our purposes, let’s say that we really want to display a JavaScript alert window during a partial postback, from code behind. Using Response.Write, this is how the task would have been accomplished:

Click here to read the rest of this post »

Highslide JS .NET (v0.3)

AJAX, ASP.NET, Highslide, UI By . Updated October 10, 2008

Highslide control bar example.Just a quick Highslide update.

The HighslideManager control now has a ControlBar property. If enabled (and it’s enabled by default), all zoomed images will have a control bar overlay.

I’ve included embedded CSS, images, and cursors for the default style, pictured above. However, custom styling can be obtained via the controlbar CSS classes.

Visit the Highslide JS .NET project page for more details and the download link for the new version.

Highslide JS .NET (v0.2)

AJAX, ASP.NET, CSS, Highslide, UI By . Updated October 10, 2008

Highslide JS .NET caption exampleYour wishes are my command. Highslide JS .NET now includes support for captioning. The captions can be specified using the Caption property of each HighslideImage control, and can be easily styled using CSS.

Also, ~ is now correctly replaced with the application path in path properties.

Visit the Highslide JS .NET project page for more details and the download link for the new version.