ASP.NET(vb.net) & PlaceHolder - asp:PlaceHolder - asp:PlaceHolder : Reserves a location in the page control hierarchy for controls that are added programmatically.
ShotDev Focus:
- ASP.NET(vb.net) & PlaceHolder - asp:PlaceHolder
Tag Control :
<asp:PlaceHolder id="PlaceHolder1" runat="server"/>
Example
PlaceHolder.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim newCtrl As New Label newCtrl.Text = "Input Your Name : " PlaceHolder1.Controls.Add(newCtrl) Dim newCtrl2 As New TextBox newCtrl2.ID = "txtName" PlaceHolder1.Controls.Add(newCtrl2) Dim newCtrl3 As New Button newCtrl3.ID = "btnSubmit" newCtrl3.Text = "Submit" PlaceHolder1.Controls.Add(newCtrl3) End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder> <hr /> <asp:Label id="lblText" runat="server"></asp:Label> </form> </body> </html>
Screenshot