Loading pages into a placeholder

N

Nicholas Beenham

Hi folks,

I'm new here and to asp .net :(

Can someone tell me how to load pages into a placeholder or point me to a
tutorial or sample code?

Thanks

Nick
 
V

vMike

On your page you put something like this.

<asp:placeholder id="Pls1" runat="server" />

and in your code one example is something like this.

Dim Box As New TextBox
Box.Text = "0"
AddHandler Box.TextChanged, AddressOf TextBox_Change
Pls1.Controls.Add(Box)

Another example is a literal control like the following.

Pls1.Controls.Add(New LiteralControl(stringControl))
where stringControl in a string variable with the literal text that will be
output to the browser like "<h1>My Heading</h1>"

Hope this helps.

You should also note that conrols added to the page have to be re-added on
postback in most cases.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top