Seamless inline text editing: The Control!

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

In my recent post, Seamless inline text editing with ASP.NET AJAX, I thought I had outlined the simplest possible way to implement the technique, but I was wrong. One of my readers, Mike Davis, took what I began and built it into the beginnings of a great ASP.NET server control.

The initial release is available here: Inline Edit Box .NET

With it, you can transparently implement the inline editable label functionality with only one line of code. He’s not finished refining it and adding new features yet, so he would like your input on where to go from here.

Download it, give it a try, and leave Mike some feedback in the comments on the download page today!

Seamless inline text editing with ASP.NET AJAX

AJAX, ASP.NET, JavaScript, Performance, UI By Dave Ward on August 23rd, 2007

Inline text editing animationThis is a technique that I really like. It’s excellently suited to intranet sites and administrative interfaces, where your users are typically familiar enough with the application to know which text they can click to edit. It’s actually very easy to implement, with a small amount of JavaScript.

Click here to continue reading this entry »

Highslide JS .NET (v0.4)

AJAX, ASP.NET, Highslide, UI By Dave Ward on August 3rd, 2007

Embedded outline graphics!

Finally, the control does what I really wanted it to from the start: It completely encapsulates Highslide JS into a single file. You no longer need a graphics/outlines directory with external outline images. Absolutely everything you need is embedded in the control’s .DLL.

If you’re upgrading from a previous version, drop the GraphicsPath property from your HighslideManager control and feel free to delete the outlines directory from your site.

As always, the latest version is available on the Highslide JS .NET download page.

Simplify ASP.NET AJAX client-side initialization

AJAX, ASP.NET, UI By Dave Ward on August 1st, 2007

I recently found myself needing to perform a bit of client-side page initialization, both on initial page load and when partial postbacks completed. I muddled through by using window.OnLoad() for the initial page load and an EndRequest handler for partial postbacks. It worked, but I wasn’t very happy with the kludgey nature of it.

On an unrelated ASP.NET forums thread around the same time, Steve Marx pointed out to me that the AJAX framework automatically wires up any client-side function named pageLoad() as an Application.Load handler. It’s actually in the docs, if you dig for it:

To handle the load and unload events of the Application object, you do not have to explicitly bind a handler to the event. Instead, you can create functions that use the reserved names pageLoad and pageUnload.

Click here to continue reading this entry »

Display data updates in real-time with AJAX

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

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 continue reading this entry »

How to improve ASP.NET AJAX error handling

AJAX, ASP.NET, CSS, UI By Dave Ward on July 18th, 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 continue reading this entry »

Easily refresh an UpdatePanel, using JavaScript

AJAX, ASP.NET, JavaScript, UI By Dave Ward on July 13th, 2007

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 continue reading this entry »

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 continue reading this entry »

A great new AJAX site (Ajax Rain)

AJAX, General, UI By Dave Ward on July 3rd, 2007

I would truly like to thank whoever submitted AJAX username availability check to Ajax Rain yesterday, for introducing me to this great resource. Until seeing it as a referrer in my stats, I was unfamiliar with the site. After taking a look today, it appears to be an absolute goldmine of client side ideas.

If you’re interested in AJAX development of any kind, check it out. Its RSS feed is definitely a permanent addition to my Google Reader.

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 continue reading this entry »