473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 11510
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jez | last post by:
I'm ashamed that I need to ask this question. I've been using PHP for almost a year now, and have used HTML extensively in the last few years. Often, when I create a new site, I use include() to...
7
by: mark | last post by:
I am designing a website at the moment and looking at the difference between relative and absolute url links which is driving me crazy! I would like to use relative paths, but it is proving very...
7
by: Fabri | last post by:
I'm trying to develop a way to include static files in htm pages with javascript. I'm trying to use XMLHTTP object this way: ...
2
by: Kraai | last post by:
in normal asp , and even php i could use the <!--#include file="login.aspx" --> or <!--#include virtual="login.aspx" --> to include pages in my main page without using frames! when i try...
3
by: Justin | last post by:
Currently I have a site template using classic asp that uses include files to seperate content from display. How can I do something similar in ASP.NET/C# code behind. Mainly I need to seperate...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
1
by: Andrew | last post by:
Hello, friends, In ASP, we use <!-- include --> to include header/footer files. What are recommended to do in ASP.net? Any sample source code or reference papers? Thanks a lot for your help.
2
by: William van Zwanenberg | last post by:
Hi there, I wonder if you guys can help. I'm currently experiencing some coding problems what with trying to use PHP and javascript in tandem. What I'm ultimately trying to achieve is use...
25
by: Mark | last post by:
so, i'm making a website. let's say i have header.php, footer.php and content.php. now in index.php I simply want to include the 3 pages. easy enough to do. but let's say the user navigates to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.