Can't dynamically add new literal to ASP.NET Panel Control

I'm trying to add dynamically controls to my WebForms control ASP:Panel in such way:

1). First of all, I'm defining some Literals in such way:

Literal paragraphBegin = new Literal();
paragraphBegin.Text = "<p>";
Literal paragraphEnd = new Literal();
paragraphEnd.Text = "</p>";
Literal breakLine = new Literal();
breakLine.Text = "<br />";

2). I have already defined Panel, which updates its content and I'm adding new items to it, like this:


3). Literals paragraphBegin && paragraphEnd are adding well, but not the breakLine Literal and I don't understand clearly - why isn't it adding?

The final problem occurs with the method in CodeBehind: SetSceneEditableUserInfo()

And the final result does look like:

enter image description here

As you see, Literal, which implements <br /> doesn't work at all. So, I also have tried to add some Literals firstly to the .Controls of Label (which is <span>, and which I thought will keep <br /> in its body), but also no success.

What I'm suppose to do, if I want to fix my issue?


try with



 ? Add dynamic ASP.NET controls via a DropDownList to the page
 ? WinForm: control won't add to a panel
 ? ASP.NET refresh Update Panel
 ? Create textbox dynamically without postback
 ? Second button Event is not happening in Update panel in aspx page
 ? ASP.Net: click event for dynamic button in dynamically created nested update panel is not raised
 ? button click event on update panel not firing in multiple user control
 ? add a panel or label control dynamically to a datagrid
 ? wxPython - problem with nested sizers, a panel and SetSizer / Fit
 ? ExtJS add panel to panel