Adding <br/> dynamically between controls asp.net
49,535
Solution 1
myPanel.Controls.Add(new LiteralControl("<br />"));
Solution 2
I would suggest that you don't use
at all. Use CSS to display your controls. display:block on your elements will work just fine. Less messy!
Author by
softwaremonster
Updated on October 04, 2020Comments
-
softwaremonster over 3 years
I'm listing some controls at my web page dynamically, either I'm adding newline with Label's.
Label newLine = new Label();newLine.Text = "<br/>"; myPanel.Controls.Add(newLine);
How can I do it in a different way?
-
softwaremonster about 14 yearsbecause i'm newbie here i have to wait for a special time to mark an answer as correct.
-
softwaremonster about 14 yearsI'm using Css either but I did not know that I could do that with Css. Could you write how? Which css code should I use?