How to Include Header and Footer files in ASP.net

G

G

Hello Friend,

I am newly migrated from ASP to ASP.NET.

When i am using ASP i used have a folder with named includes where i store
header. asp and footer.asp pages.
and i use <!-- #include file ="'' --> to access those files where ever in
need.

SO now my doubt is how to use the same thing(header & footer parts) in
ASP.net.

Thanks in Advance

Gaffar.
 
K

kkongchi

Hello Friend,

I am newly migrated from ASP to ASP.NET.

When i am using ASP i used have a folder with named includes where i store
header. asp and footer.asp pages.
and i use <!-- #include file ="'' --> to access those files where ever in
need.

SO now my doubt is how to use the same thing(header & footer parts) in
ASP.net.

Thanks in Advance

Gaffar.

1. Make Header and Footer by User Control(ASCX)
2. Custom Control is more powerful and agile but it's difficult to
make
3. if header and footer has no programming part or changeable part,
you can use server-side include "<!-- include -->
4. In ASP.NET 2.0, you can use Masterpage framework newly introduced
in ASP.NET 2.0
 
J

John Timney \(MVP\)

You definately should be considering master pages for common layout. Theres
some great tutorials about and once you get your head round them you wont
look back. You can extend this further by creating user controls containing
your header and footer elements if you wish to make it more object based.

--
--
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
 
G

G

Hey,

This is great! i done this day.
ANother doubt i am having is how to add stylesheet to master page.
I tried at first time it is worked and for other application it is not
working. can please help me out.

Thanks in Advance.

Gaffar .
 
G

Guest

Open the master page file and drag the style sheet on to create the link tag.
Otherwise, put a style sheet in the App_Theme folder for the current theme
and it will be added automatically.
 

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

Top