I am working on a page that has user controls that are arranged in a particular layout. I am modifying that page to support reordering the position based on user’s preferences. So, essentially, on load, I have information on where I need to position the different user controls.
I can think of 2 approaches:
- Do the reordering on the client side. This is not ideal for the user
as they see the reordering happening. - Do the reordering on the server side. This requires me to do a lot of
rewrite to dynamically load the user controls based on preferences.
Are there any other ways of accomplishing what I am trying to do?
There is an easier way; rendering is controlled by the parent container rendering them. It is possible to create a container, and have full control over the ordering of the rendering of its children (by overriding the RenderChildren method). It’s not the easiest option, but it can work. The steps are: