all groups > asp.net webcontrols > june 2004 >
You're in the

asp.net webcontrols

group:

adding linebreaks to a control


adding linebreaks to a control chandy NO[at]SPAM totalise.co.uk
6/29/2004 9:12:44 AM
asp.net webcontrols:
Hi,

I have a user control which build a list menu from HtmlGenericControl
objects (UL and LI). It works well and produces valid HTML, but all
on one line. Any ideas as to how I can get the syntactically-valid
equivalent of the following?

ul.Controls.Add(CType(VbCrLf,Control))

TIA

Re: adding linebreaks to a control Ken Cox [Microsoft MVP]
6/29/2004 12:17:17 PM
Hi Chandy,

How about creating a new literal control with the text = "<br />" and add
that to the controls collection each time you need a line break?

Ken

[quoted text, click to view]
AddThis Social Bookmark Button