Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

ASP.Net Panels:  Good?  Bad?

Hi, I'm just curious as to how others are using Panels.  I read a quick article on how one person used it in a wizard framework.  Each panel represented a page... and at the end all the data was accessible.  That sounds great.

Is this use recommended?

How is this on Viewstate?  I can imagine a wizard with lots of pages would have a very large ViewState. 

Wednesday, May 21, 2003

I tend to do this a lot, but I'm pretty sure that the overwhelming majority of people who look at my ASP.NET pages are using broadband (and we don't get anywhere near enough traffic to make reducing bandwidth use on our end important), so I'm not hugely sensitive to bandwidth issues.

Dave Rothgery
Wednesday, May 21, 2003

A Panel is a <div>. So I guess they're good :-). Turn off ViewState using:
  <asp:Panel EnableViewState='false' ... >

Turn off ViewState completely using simialar options on <%@Page%> or web.config.

Other ones to consider:

<asp:PlaceHolder> -- a container without the <div> -- like the panel allows you to show and hide chunks of a page.

<asp:Literal> -- more like a Label (which is a <span>) but without the <span> -- hence you can't 'style' it.

Duncan Smart
Wednesday, May 21, 2003

For the wizard I would consider (if it's getting too big) turning off ViewState for the panels and have store just what you need directly in ViewState using 'Page.ViewState["blah"] = whatever'.

Duncan Smart
Wednesday, May 21, 2003

I prefer using placeholder because when I try using panel it works fine but I could not see that in design mode in Dreamweaver. But with placeholder control, I was able to see it visually. It maybe due to the way Dreamweaver handle these controls.


Thursday, May 22, 2003

*  Recent Topics

*  Fog Creek Home