visible - hidden

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

two labels, one with a list of input controls, and another with a datagrid
depending on which button is clicked, one of the labels is put visible, the
other one is put hidden with a css class
like this..
this.labelname.Attributes.Add("class","hidden");
this.labelname.Attributes.Add("class","visible");

but if i want to put the label back to visible, all the content is gone...
 
What do you mean by "one with a list of input controls, and another with a
datagrid"? And what is the content of the label? Usually it's just a string.

Eliyahu
 
If you are using asp.net label controls to display a group of other asp.net
controls (asp.net buttons etc) you should be using something like a asp.net
Panel or PlaceHolder IMHO.

If you make a asp.net control non visible (.Visible = false) it will not be
rendered to the page so therefore any state of the control is lost between
postbacks.

HTH

Ollie Riches
 
Back
Top