LinkMindr.com Updated with More ASP.NET AJAX
May 1st, 2007I have updated LinkMindr.com with a few improvements. The big change is limiting the tag cloud to just 35 of the most recently modified tags. At the bottom I have a drop down list for all of the tags so users can still access all of their tagged items. This conserves real estate on the page and makes the most used tags more accessible.
As a part of this change I also converted the page to use PostBack events as triggers for the UpdatePanel which is a features of the new ASP.NET AJAX control suite. Previously I had a clever jQuery call handle all of my AJAX functionality but with the latest changes it became easier to handle this functionality with event triggering.
The tag cloud is actually a User Control which has an event on it which is raised whenever a tag is selected. The 35 shown links are LinkButton controls which raise this event. The ListBox control showing all of the tags does a PostBack automatically when the selected value changes which also raises the event. I was pleasantly surprised that I was able to attach my User Control to the list of triggers for the UpdatePanel. Now it automatic handles the AJAX functionality just as it would if it was just a regular Panel.
Finally, to preserve the “loading” display while the AJAX request is processing I attached the behavior to the page using the code below. The PageRequestManager handles the page which includes the events triggering the UpdatePanel.
I still have one lingering question. How can I arbitrarily tell the UpdatePanel to run an update from the client-side without having it bound to a PostBack event for a control? I have posted the question to the forums and have no answer so far.
[ Update: I have come up with a solution which have posted to the forums. ]
