What is the best approach to show and hide an asp panel which is containing other controls like textbox and label controls
2 Answers
Using jQuery, you can just switch visibilty:
$('#<%= YourPanel.ClientID %>').hide();
$('#<%= YourPanel.ClientID %>').show();
Edit: jQuery is probably overkill just to hide/show, but if you plan to add more functionality client side, you should consider using it ;)
2 Comments
Brad Christie
I would even recommend setting the panel's ClientIDMode to static.
Guillaume86
Good idea to get rid of the asp.net tag soup (if he use .NET 4.0)