By anomaly on
6/10/2005 8:23 AM
In the July issue of MSDN Magazine, Dino Esposito provided an excellent article on allowing DHMTL in ASP.Net Controls. This is a core concept for a project that I am working on, so I thought I would share my particular solution to the problem.First, the problem. -- If you use DHTML and client-side scripting to manipulate server side objects, whatever attributes of those HTML elements that were changed since initial page render via DHTML will be lost on postback. My particluar need for DHTML was related to allowing users to move controls around a webform (a form designer) and then saving the new X/Y coordinates of those controls for later use.
Inspired from Mr. Esposito's article, I decided to model my solution using a single hidden field. I wasn't excited about this approach but I did consider it to me a good alternative to the common approach of adding one hidden field per DHTML-manipulated server control.
Since my particular need was to capture X and Y coordinates of controls that have...
Read More »