Add controls at runtime

  • Thread starter Thread starter JezB
  • Start date Start date
J

JezB

I have a page that is in Flow layout mode. I'm adding a list of hyperlinks
programatically with code such as :

HyperLink h = new HyperLink();
h.Text = pDesc;
h.NavigateUrl = "placeholders0.aspx?grp="+pGrp;
Page.Controls.Add(h);

(in a loop). The problem is that these appear all on one line on my page, as
in :

Link1Link2Link3

How can I force each link to be on a new line ?
 
Same as if you were coding HTML by hand. Yo'ull have to add whatever you
want (BR tags for example) in between...

Patrice
 
Ah but I'm new to web programming and have never done any HTML ! But I have
found out what you mean - thanks.
 
Ok sorry. Just for completeness, most elements are just displayed "in line".
You have explictely to express that you want to go to the next line...

Welcome to the Web ;-)

--
 
Back
Top