« SQL Server and CSV | Main | Website Redux »
Ajax for ASP.NET and the UpdatePanel Control
For a recent project, I've been using the latest Release Candidate of the new ASP.NET AJAX (formerly known as Atlas) framework from Microsoft.
A couple of frustrating issues came up along the way. In this post I want to share how I was able to resolve these issues. Here's the scenario (I think it will be a common one): the page I'm building presents a drop down list. When the value selected in the drop down list changes, panels on the page are updated via Ajax with content dependent on the value selected in the drop down list.
Problem: The drop down list control is not inside the UpdatePanel. In order to use the drop down list to update the UpdatePanel I defined it as a Trigger in the UpdatePanel properties as described here. No matter what, however, the drop down list control would not fire an Ajax call, even though it was listed as a trigger for the UpdatePanel in question. A button worked just fine.
Resolution: The drop down list control must have the AutoPostBack property set to true or it will not respond as a trigger for an UpdatePanel.
Problem: If an UpdatePanel is updated as the result of an external control, any associated UpdateProgress control will not fire. If the triggering control is inside the UpdatePanel, it works fine.
Resolution: The javascript for unhiding the UpdateProgress ContentTemplate must be written into the page manually. I finally discovered a resource to explain this here.
This project also uses a version of the nifty SubSonic open source project which I customized for use with the Sage CRM SalesLogix Web product. I hope to post more about SubSonic later.
Tags: ajax, asp.net, microsoft | Permalink

