Barnum Productions Blog

Barnum Produces for the Future

I see a lot of people in forums asking how to create a collapsing panel in ASP.NET.

Truth of the matter is that it’s a very simple task.

You just need a DIV with an assigned unique ID. Clicking on an element of your choice on the form will check to see if the “display” style attribute of the DIV in question is set to “none” and then either set it to an empty string or to “none”, depending on the reverse of the current state. It’s that simple.

HOWEVER, if you can’t be bothered writing the code, and you just want to drag and drop there’s a great free collapsing panel control for asp.net right here. Drag it to your form, assign your CSS to make it look nice. That’s it! There’s a nice example on the website.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Leave a Reply