using includes

Results 1 to 2 of 2

Thread: using includes

  1. #1
    Join Date
    Dec 1969

    Default using includes

    I am wanting to use dynamic includes by grabing the querystring value and inserting the page it specifies<BR><BR>ie. default.aspx?p=home.ascx<BR><BR>I need to user the user controls but not sure how to.<BR>Could you please help!<BR><BR>Dizzy

  2. #2
    Join Date
    Dec 1969

    Default RE: using includes

    First you need to create a container for your dynamic controls.<BR>Place this text in the body of the page:<BR>&#060;!--- BODY ---&#062;<BR>&#060;asp:Panel id="body" runat=server/&#062;<BR><BR>&#060;!--- BODY ---&#062;<BR><BR>Then you need to access the control and bring it to life:<BR> Dim strPage As String = request.querystring("p")<BR> body.Controls.Add( Page.LoadControl(strPage & ".ascx") )<BR><BR><BR>Tommy McConnell<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts