Reputation: 2516
If I have an asp.net web page with placeholders, what is the simplest way to wrap a line break
into a control that I can pass to the Add function of the placeholder?
Upvotes: 8
Views: 7277
Reputation: 41
Just use literalcontrol
yourPlaceholder.Controls.Add(new LiteralControl("<br />"))
Upvotes: 4
Reputation: 351516
You could add it as an HtmlGenericControl
:
yourPlaceholder.Controls.Add(new HtmlGenericControl("br"));
Upvotes: 16