GeekInterview.com
Series: Subject: Topic:
Question: 152 of 348

my interviewer asked me i want maintain same header and footer in number of pages what is the way to do minimum level of code i use? i said user control he again asked what areall the other ways?

Asked by: Interview Candidate | Asked on: Oct 13th, 2006
Showing Answers 1 - 29 of 29 Answers
Santhos

Answered On : Oct 14th, 2006

u have to use Master Page

Santosh

Yes  3 Users have rated as useful.
  
Login to rate this answer.
Chand

Answered On : Oct 14th, 2006

you can do this with user Countrols , make one user countrol and add this pages where u want.

Chand.

  
Login to rate this answer.
Pallavi

Answered On : Oct 18th, 2006

use an usercontrols.

  
Login to rate this answer.
Neelima

Answered On : Oct 18th, 2006

It can be done by both ways user controls and Master Pages.

Master page is not available in asp.net 1.1

Yes  3 Users have rated as useful.
  
Login to rate this answer.
Muhammad Anees

Answered On : Oct 30th, 2006

AOA!

To maintain same header and foor on all pages of a site add user controls. Define header style in header user control and footer logic and interface in footer user control.Then only pick,drag and drop header and footer on your pages.

  
Login to rate this answer.
Amit

Answered On : Nov 8th, 2006

you can mantain the same header and footer throught the application defining that Hedaer and Footer in Global.aspx event session_start and session_end.

Header will be at session_start

Footer will be at session_end.

It will render before excuting any page.

  
Login to rate this answer.
pradeep reddy

Answered On : Nov 18th, 2006

u can do this with cascaded style sheets(css) very easily

  
Login to rate this answer.
Chandan Agarwal

Answered On : Nov 22nd, 2006

Yes, u can do it. There are two way.1. If the header & footer is only colour based then use css 2. If it contanis images and data then create User Control

  
Login to rate this answer.
nraj71

Answered On : Dec 8th, 2006

View all answers by nraj71

Other way is using custom control utility.

Create Header /Footer as UserControls.

define Custom control in class file .Here state location of header control as starting control and Footer as last control in render event.

Now when ever u add new webform in your application inherit the class of webform from the custom control class.Runtime it will take header and footer .No need to drop User controls on each page you add.

  
Login to rate this answer.
preetamjain

Answered On : Dec 22nd, 2006

View all answers by preetamjain

by make template of ur application u can easily call each page in template . and in main template u use header and footer once...any Query plz contact preetamjain@gmail.com

  
Login to rate this answer.
R.Ravi Kumar

Answered On : Jan 5th, 2007

We can use UserControl or MasterPage

But In .NET framework 1.1 There is no MasterPage Facility ,So we will go through UserControl,and we need to place UserControl in every Page.

But In .NET framework 2.0 MasterPage is Provided,Her we never place any thing in every page,while adding new page we need to select AddMasterpage option,that's it.

Yes  1 User has rated as useful.
  
Login to rate this answer.
gbengaoris

Answered On : Jan 9th, 2007

View all answers by gbengaoris

Hi,

You can create header and footer in any of the following:

(1) Master Page

(2) HttpModule

(3) UserControl

(4) Global.asax

  
Login to rate this answer.
riteshop_modi

Answered On : Feb 10th, 2007

View all answers by riteshop_modi

Simplly if you are working in Framework version 1.1 then you can use User control but you are working in framework version 2.0 then you can done this task by using Masterpage and UserControl both.

  
Login to rate this answer.
Rajesh K

Answered On : Feb 14th, 2007

We can use :1) User Controls 2 ) Master Page -- .net2.03) Frames

  
Login to rate this answer.
Anish

Answered On : Mar 12th, 2007

A simple way is just make two files say top.htm and bot.htm
and include this file in all your page using

  
Login to rate this answer.
vinod khattri

Answered On : Aug 22nd, 2007

If you are using .NET 2.0 then use Master Page and if you are using old version than 2.0 then use User control.

  
Login to rate this answer.

In ASP.NET 2 you can use master pages
In AS.NET 1.1 you can use user controls
In ASP Classic you can create templates and use with Include tags.

  
Login to rate this answer.
sasikanth3e

Answered On : Dec 10th, 2007

View all answers by sasikanth3e

use css (cascaded style sheets)

  
Login to rate this answer.
nagasridhar.m

Answered On : Dec 11th, 2007

View all answers by nagasridhar.m

Just make use of Master page and import the master page to ur aspx pages with out any code the things will be done.
All the best

  
Login to rate this answer.
preetamjain

Answered On : Dec 11th, 2007

View all answers by preetamjain

You Can Use 'master page' having control place holder on it . by using it you can easily achive your goal

  
Login to rate this answer.
bals.balu

Answered On : Apr 22nd, 2008

View all answers by bals.balu

We can do it by master pages or user controls. by using the master pages we can use it in any page in the fixed area. But by using the web user controls we can drag it to any area in a partiular page.

  
Login to rate this answer.
smsayami

Answered On : May 6th, 2008

View all answers by smsayami

Master page

  
Login to rate this answer.
sangitapatra

Answered On : May 14th, 2008

View all answers by sangitapatra

Yes it can be easily done by using master page

  
Login to rate this answer.

use master page

  
Login to rate this answer.
nippu_m

Answered On : Jun 2nd, 2008

View all answers by nippu_m

you can create usercontrols

  
Login to rate this answer.

We can prepare two user controls one for header and another for footer. Whenever we required we can use them

  
Login to rate this answer.
vasuramireddy

Answered On : May 31st, 2011

View all answers by vasuramireddy

By Placing the Header & Footer in Master Page we can maintain in number of pages.

  
Login to rate this answer.

you can create usercontrols of both the footer and header and put then in masterpage.its very easy to maintain

  
Login to rate this answer.
pervej

Answered On : Nov 18th, 2011

View all answers by pervej

frame
masterpage
usercontrol

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.