Please visit our sponsors !
PlaceHolder Control
Definition and Usage
The PlaceHolder control is used to reserve space for controls
added by code.
Note: The PlaceHolder control does not produce any visible output (it
only acts as a container for other controls on the Web page).
Properties
Property |
Description |
id |
A unique id for the control |
runat |
Specifies that the control is a server control. Must
be set to "server" |
Example 1
In the following example we declare one PlaceHolder control in an .aspx file. Then we add
some Web server controls to the PlaceHolder control in the Page_Load
event:
<script runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
dim b As HtmlButton=New HtmlButton()
b.InnerText="1"
pholder.Controls.Add(b)
b=New HtmlButton()
b.InnerText="2"
pholder.Controls.Add(b)
End Sub
</script>
<html>
<body>
<form runat="Server">
<asp:PlaceHolder id="pholder" runat="server"/>
</form>
</body>
</html>
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|