adding linebreaks to a control

C

Chandy

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

Chandy
 
K

Ken Cox [Microsoft MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top