473,893 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11546
Submit this search term to google...

master pages overview site:msdn2.micr osoft.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**********@g mail.comwrote in message
news:eV******** ******@TK2MSFTN GP06.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...@g mail.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**********@g mail.comwrote in message
news:eV******** ******@TK2MSFTN GP06.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*********@RE MOVETHISTEXTmet romilwaukee.com wrote in message
news:uz******** ******@TK2MSFTN GP05.phx.gbl...
Submit this search term to google...

master pages overview site:msdn2.micr osoft.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**********@g mail.comwrote in message
news:eV******** ******@TK2MSFTN GP06.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*********@RE MOVETHISTEXTmet romilwaukee.com wrote in message
news:uz******** ******@TK2MSFTN GP05.phx.gbl...
Submit this search term to google...

master pages overview site:msdn2.micr osoft.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**********@g mail.comwrote in message
news:eV******** ******@TK2MSFTN GP06.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.mi crosoft.comwrot e in
message news:BF******** *************** ***********@mic rosoft.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*********@RE MOVETHISTEXTmet romilwaukee.com wrote in
message
news:uz******* *******@TK2MSFT NGP05.phx.gbl.. .
Submit this search term to google...

master pages overview site:msdn2.micr osoft.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**********@g mail.comwrote in message
news:eV******** ******@TK2MSFTN GP06.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
4130
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 add an HTML header at the top of the page and a footer (ususally including a menu) at the bottom. Up to now I've created two or more copies of each header and footer, the only difference being the path to linked files. For example, in
7
2842
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 restrictive as to how I design the file structure when it comes to including files. I currently have something like below: folder1 folder2 images ---image1.gif
7
2510
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: ---------------------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>
2
3132
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 this with my aspx page's i get the following error! There can be only one 'page' directive
3
1352
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 navgation header, side bar and content. Any tips or techniques would be great. Thanks, Justin.
6
2131
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file = ...\includes\StaffingHeaders.inc -->" </Script> <%=ClientName%> ****************************************************************************
1
1495
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
1936
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 Javascript to access the DOM objects of any given page within the web site I'm building to dyanamically resize any and all text elements. I have Javascript some code that works
25
2283
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 mysite.com/content.php. now the header and footer will appear to be missing. so now the question is, how can i include the header and footer in content.php only if the page isn't already nested?
0
9985
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11244
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10839
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10927
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10469
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9646
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
4280
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.