B
Bo
What should I change to the code below to have <asp:Label id="lblText"
runat="server"></asp:Label> shown inside <asp:Content ID="dynamicContent"
runat="server" ContentPlaceHolderID="ContentPlaceHolder2"></asp:Content> ?
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim objCtrl As Control
Dim strPage As String
strPage = Request.QueryString("p")
IF strPage = "page1" Then
objCtrl = LoadControl("~/1.ascx")
ElseIF strPage = "page2" Then
objCtrl = LoadControl("~/2.ascx")
Else
objCtrl = LoadControl("~/0.ascx")
End IF
Me.lblText.Controls.Add(objCtrl)
End Sub
</script>
<form id="form1" runat="server">
<asp:HyperLink id="hplLink1" runat="server"
NavigateUrl="?p=page1">Menu(1)</asp:HyperLink>
<asp:HyperLink id="hplLink2" runat="server"
NavigateUrl="?p=page2">Menu(2)</asp:HyperLink>
<asp:Label id="lblText" runat="server"></asp:Label>
</form>
runat="server"></asp:Label> shown inside <asp:Content ID="dynamicContent"
runat="server" ContentPlaceHolderID="ContentPlaceHolder2"></asp:Content> ?
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim objCtrl As Control
Dim strPage As String
strPage = Request.QueryString("p")
IF strPage = "page1" Then
objCtrl = LoadControl("~/1.ascx")
ElseIF strPage = "page2" Then
objCtrl = LoadControl("~/2.ascx")
Else
objCtrl = LoadControl("~/0.ascx")
End IF
Me.lblText.Controls.Add(objCtrl)
End Sub
</script>
<form id="form1" runat="server">
<asp:HyperLink id="hplLink1" runat="server"
NavigateUrl="?p=page1">Menu(1)</asp:HyperLink>
<asp:HyperLink id="hplLink2" runat="server"
NavigateUrl="?p=page2">Menu(2)</asp:HyperLink>
<asp:Label id="lblText" runat="server"></asp:Label>
</form>