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?

Showing Answers 1 - 75 of 83 Answers

Santhos

  • Oct 14th, 2006
 

u have to use Master Page

Santosh

Chand

  • Oct 14th, 2006
 

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

  Was this answer useful?  Yes

Pallavi

  • Oct 18th, 2006
 

use an usercontrols.

  Was this answer useful?  Yes

Neelima

  • 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

Muhammad Anees

  • 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.

  Was this answer useful?  Yes

Amit

  • 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.

  Was this answer useful?  Yes

pradeep reddy

  • Nov 18th, 2006
 

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

  Was this answer useful?  Yes

Chandan Agarwal

  • 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

  Was this answer useful?  Yes

nraj71

  • Dec 8th, 2006
 

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.

  Was this answer useful?  Yes

preetamjain

  • Dec 22nd, 2006
 

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

  Was this answer useful?  Yes

R.Ravi Kumar

  • 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.

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.

  Was this answer useful?  Yes

Rajesh K

  • Feb 14th, 2007
 

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

  Was this answer useful?  Yes

Anish

  • 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

  Was this answer useful?  Yes

vinod khattri

  • 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.

  Was this answer useful?  Yes

bals.balu

  • Apr 22nd, 2008
 

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.

  Was this answer useful?  Yes

Shrikant B

  • May 18th, 2016
 

A) Need to create the user control for both "Footer" and "Header".
B) Need to create the Master page for the website and then derive the aspx pages form this.

  Was this answer useful?  Yes

Pankaj

  • Aug 1st, 2017
 

by using MasterPage

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions