I'm adding controls to a panel on an Asp.Net webforms page and I'd like to change the html it generates. A simplified example of what I'm doing:
Dim control1 As New HiddenField()
control1.ID = "Control1"
control1.Value = "Text"
Dim control2 As New HiddenField()
control2.ID = "Control2"
control2.Value = "Text"
Panel1.Controls.Add(control1)
Panel1.Controls.Add(control2)
This generates the following HTML:
<input type="hidden" name="Control1" id="Control1" value="Text" /><input type="hidden" name="Control2" id="Control2" value="Text" />
Is there a way to ensure that there's a newline in between every control? The current source is a pretty big mess when you add more controls. I'd like the html to be formatted like this:
<input type="hidden" name="Control1" id="Control1" value="Text" />
<input type="hidden" name="Control2" id="Control2" value="Text" />