469,271 Members | 840 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

How to Include Header and Footer files in ASP.net

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.

Feb 15 '07 #1
6 11062
Submit this search term to google...

master pages overview site:msdn2.microsoft.com

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

"G" <su**********@gmail.comwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
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.

Feb 15 '07 #2
On Feb 15, 2:21 pm, "G" <support.s...@gmail.comwrote:
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

Feb 15 '07 #3
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" <su**********@gmail.comwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
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.

Feb 15 '07 #4
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 .
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:uz**************@TK2MSFTNGP05.phx.gbl...
Submit this search term to google...

master pages overview site:msdn2.microsoft.com

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

"G" <su**********@gmail.comwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
>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.


Feb 15 '07 #5
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.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"G" wrote:
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 .
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in message
news:uz**************@TK2MSFTNGP05.phx.gbl...
Submit this search term to google...

master pages overview site:msdn2.microsoft.com

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

"G" <su**********@gmail.comwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
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.


Feb 15 '07 #6
Its not as easy as Carian suggests. There'a an ugly monster hiding under
every ASP.NET 2.0 bed that has been released as incomplete and buggy
crippleware. Read both [1,2] to learn more about MasterPages and Themes.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

[1] http://odetocode.com/
[2] http://adam.kahtava.com/home/

"Ciaran O''Donnell" <Ci************@discussions.microsoft.comwrote in
message news:BF**********************************@microsof t.com...
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.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"G" wrote:
>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 .
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.comwro te in
message
news:uz**************@TK2MSFTNGP05.phx.gbl...
Submit this search term to google...

master pages overview site:msdn2.microsoft.com

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-...8&z=17&l=0&m=h

"G" <su**********@gmail.comwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
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.





Feb 15 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jez | last post: by
7 posts views Thread by mark | last post: by
7 posts views Thread by Fabri | last post: by
2 posts views Thread by Kraai | last post: by
3 posts views Thread by Justin | last post: by
6 posts views Thread by tshad | last post: by
1 post views Thread by Andrew | last post: by
2 posts views Thread by William van Zwanenberg | last post: by
25 posts views Thread by Mark | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.