Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmatically changing a panel's text

Status
Not open for further replies.

JulesBos

Programmer
Sep 6, 2006
68
US
Hi

I'm creating a webpage using panels so that the height of each section of the page is dynamic. Each panel needs different text depending on the user/circumstances.

Is there a way of setting panel text programmatically? Panels do not appear to have a text property, but you can type text directly into them.

If I can't change the panel text programmatically does this mean I need to add a label to each panel? and if so, the label size needs to be dynamic, how do I achieve that?

Thanks in advance.
Julia
 
Labels will render a span tag by default which will grow to the size of it's text. So, add a Label control to the Panel and don't specify the Width property.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top