I have been using the ASP.NET AJAX UpdatePanel control recently for some of the intranet applications I have been working on, and for the most part I have used it to dynamically update data or hide and show controls on forms based on user actions.
There is one place where I had problems, and I wonder if anyone has any advice. My form uses a fairly typical table-based layout, where the table is used to display a grid of labels and fields to populate by the user. (I already know that tablet layouts are ignored by some people, and I understand the pros and cons. But I made this choice, so please do not answer "Do not use table layout.")
Now my problem is that there are times when I would like to wrap the UpdatePanel around a set of rows so that I can hide and show them dynamically, but the UpdatePanel really does not allow you to do this. The main problem is that it wraps divs around them, and as far as I know, you cannot wrap divs around table rows. It is not valid HTML.
Thus, I was dealing with making my dynamic rows part of a whole new table completely, which is good, but then you have to deal with aligning all columns manually with the table above it, and that is a real pain and quite fragile.
So, the question is ... does anyone know of a technique for dynamically creating or updating rows using either UpdatePanel or something similar? We hope that the solution will be almost as simple as removing the UpdatePanel on the page, but even if it is not, I would still like to hear it.
jeremcc
source share