<% @ Page Language="C#" %>
<% @ Import Namespace="System.Data" %>
<Script Language="C#" Runat="Server">
public void Page_Load(Object src,EventArgs e)
{
Label lblTitle = new Label();
lblTitle.Text = "添加至PlaceHolder的Label控件";
holder.Controls.Add(lblTitle);
Button btnSubmit = new Button();
btnSubmit.Text = "添加的Button控件";
holder.Controls.Add(btnSubmit);
}
</script>
<html>
<head>
<title></title>
</head>
<body>
<form runat="server">
<b>演示PlaceHolder控件</b><br>
<asp:PlaceHolder id="holder" runat="server" />
</form>
</body>
</html>