Results 1 to 2 of 2

Thread: Template

  1. #1
    Join Date
    Dec 1969

    Default Template

    How can i user templeate in asp.net can any body help me this is my first project wtih .net using templeate we user to with asp but to use template in asp.net.pls help me.code will be much better<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Template

    You can create a "Web User Control". This is where you put all your header, footer, and side navigation information. You then need to create a base class page and put something like this to it:<BR><BR>Protected Overrides Sub OnInit(ByVal e As System.EventArgs)<BR> Me.Controls.AddAt(0, LoadControl("/Header.ascx"))<BR> MyBase.OnInit(e)<BR> Me.Controls.Add(LoadControl("/Footer.ascx"))<BR>End Sub<BR><BR>Then in all your aspx pages you need to inherit this base class page instead of inheriting the System.Web.UI.Page.<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