MasterPage in ASP.Net

MasterPage in ASP.Net

 

  • MasterPage is a very useful concept of ASP.Net.
  • A single master page defines the look and feel and standard behavior¬† for all of the pages in your .Net application. 
  • Start to Create a MastePage in ASP.Net 
  • First, Add new masterpage in your web application from add new item tab. 
  • give the name of masterpage which you want. and then click add button to create new masterpage in your web application.

  • After doing this, you will have a below screen. 
  • which describe the HTML code of MastePage.
  • Below screen is design view of MasterPage.
  • Design your Masterpage with your ideas.

 

  • After Designing Masterpage we must apply this Masterpage to your web pages.

 

  • For applying MasterPage on your Webpage, 
  • Open the HTML code view of your webpage. 
  • Remove all code with tag.
  • Remove all HTML coding from Webpage.

 

  • Write down code on HTML side for add ContentPlaceHolder as per the shown in below figure.

 

  • After, doing this Masterpage apply on your web page.

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 6 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">