Template?

  • Thread starter Thread starter Arsalan
  • Start date Start date
A

Arsalan

How do I make template, for e.g header & footer that will be consistent on
all the pages in my application ? Is it possible to load header from other
files?
 
Proabably the easiest thing to do is to create two web user controls called
'Header' and 'Footer'. Add them to each page. It's also quite easy to load
the header from another file, like this:

Control objHeader = LoadControl("Header.ascx");
Control objFooter = LoadControl("Footer.ascx");
this.Controls.Add(objHeader);
this.Controls.Add(objFooter);

Kind regards,
Nikander & Margriet Bruggeman
 
Proabably the easiest thing to do is to create two web user controls called
'Header' and 'Footer'. Add them to each page. It's also quite easy to load
the header from another file, like this:

Control objHeader = LoadControl("Header.ascx");
Control objFooter = LoadControl("Footer.ascx");
this.Controls.Add(objHeader);
this.Controls.Add(objFooter);

Kind regards,
Nikander & Margriet Bruggeman
 
Thanks a lot
"Nikander & Margriet Bruggeman"
Proabably the easiest thing to do is to create two web user controls
called
'Header' and 'Footer'. Add them to each page. It's also quite easy to load
the header from another file, like this:

Control objHeader = LoadControl("Header.ascx");
Control objFooter = LoadControl("Footer.ascx");
this.Controls.Add(objHeader);
this.Controls.Add(objFooter);

Kind regards,
Nikander & Margriet Bruggeman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top