Why ASP.NET AJAX UpdatePanels are dangerous

AJAX, ASP.NET, Performance By Dave Ward on July 11th, 2007

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 Dave Ward on July 9th, 2007

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 Dave Ward on July 2nd, 2007

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 Dave Ward on June 19th, 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 Dave Ward on June 8th, 2007

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 Dave Ward on May 2nd, 2007

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.

Disable a button control during postback.

ASP.NET, UI By Dave Ward on April 17th, 2007

Postback Ritalin has been getting a lot of search hits intended to find a button disable technique for full .NET postbacks. So, this example is for all of you searching for a non-AJAX solution.

The trick is to use the OnClientClick and UseSubmitBehavior properties of the button control. There are other methods, involving code on the server side to add attributes, but I think the simplicity of doing it this way is much more attractive:

Click here to read the rest of this post »

Highslide JS .NET Release

AJAX, ASP.NET, CSS, Highslide, UI By Dave Ward on March 26th, 2007

My initial .NET server control version of Torstein Honsi’s Highslide JS .NET is now available. You can find it and information on implementing it at the Highslide JS .NET page here on my site.

For a quick video introduction of what the Highslide JS library is capable of, take a look at this basic demonstration:

Click here to read the rest of this post »

Image Zooming Control Preview

AJAX, ASP.NET, CSS, Highslide, UI By Dave Ward on March 22nd, 2007

Update: Highslide JS .NET is available for download now.

I’ve been working on and off for some time to encapsulate Torstein Honsi’s excellent Highslide JS library into a .NET control. Finally, pending naming, it is ready for use. It should be available for download in the next couple days. Until then, here is a preview of it in action:

Click here to read the rest of this post »

Postback Ritalin Update (v0.2)

AJAX, ASP.NET, UI By Dave Ward on March 16th, 2007

Based on my experience using it in the wild and some great feedback from those of you that downloaded it, I’ve made a few updates to Postback Ritalin. Get it and enjoy.

If you haven’t seen Postback Ritalin yet, it’s an AJAX Toolkit control extender to automatically disable an UpdatePanel’s submitting control during partial postbacks and then re-enable them after the partial postback completes. More details are available on the permanent Postback Ritalin page.

Click here to read the rest of this post »