I have an ASP NET user control (ascx) that shows about 10 fields of some entity, and I wonder if it is possible to have a “summary view” pattern so I can just show 3-4 fields when this control is in summary mode, how can I achieve this in a fancy way?, do I need to hide all unused fields on page load or is there a better solution?
I also want to be able to change between modes on clientside.
Thanks a lot!
If you want to change between summary and detail modes on the clientside, the easiest way would be to serve up all the content. Don’t use
Visible="False"to hide the content that shouldn’t be visible in summary mode. Instead usestyle="display: none;". That way, you can have a link or button which runs a simple JavaScript function to show or hide the content.