Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding HTML to a placeholder

Status
Not open for further replies.
Feb 8, 2002
43
US
How do you add HTML to a placeholder? The following code comes from the microsoft site. When this is outputted, the buttons show up side by side. I would like to output the buttons in a table format with in the place holder (or a least with a <BR> so they won't be side by side) How would I do this?

Sub Page_Load(Sender As Object, e As EventArgs)

Dim myButton As HtmlButton = New HtmlButton()

myButton.InnerText = &quot;Button 1&quot;
PlaceHolder1.Controls.Add(myButton)

myButton = New HtmlButton()
myButton.InnerText = &quot;Button 2&quot;
PlaceHolder1.Controls.Add(myButton)

myButton = New HtmlButton()
myButton.InnerText = &quot;Button 3&quot;
PlaceHolder1.Controls.Add(myButton)

myButton = New HtmlButton()
myButton.InnerText = &quot;Button 4&quot;
PlaceHolder1.Controls.Add(myButton)

End Sub
 
You can use a literalControl to add html to a placeholder (or anywhere else for that matter)

dim lc as new literalcontrol(&quot;<br>&quot;)
placeholder.controls.add(lc)
penny1.gif
penny1.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top