Question

In: Computer Science

Explain in your own words what is meant by the .NET term of "master pages"? Include...

Explain in your own words what is meant by the .NET term of "master pages"? Include an example.

Solutions

Expert Solution

A master page is an ASP.NET file with the extension . master (for example, MySiteABC. master) with a predefined layout that can include static text, HTML elements, and server controls. The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary.

Master pages provide templates for other pages on your web site.

Master pages allow you to create a consistent look and behavior for all the pages (or group of pages) in your web application.

A master page provides a template for other pages, with shared layout and functionality. The master page defines placeholders for the content, which can be overridden by content pages. The output result is a combination of the master page and the content page.

The content pages contain the content you want to display.

When users request the content page, ASP.NET merges the pages to produce output that combines the layout of the master page with the content of the content page.

When a web request arrives for an ASP.NET web form using a master page, the content page (.aspx) and master page (.master) merge their content together to produce a single page. Let’s say we are using the following, simple master page.

<%@MasterLanguage="VB" %>

<htmlxmlns="localhost/1999/xhtml">
<headrunat="server">
  <title>Untitled Page</title>
</head>
<body>
  <formid="form1"runat="server">
    <div>
      <asp:ContentPlaceHolderID="ContentPlaceHolder1"runat="server">
      </asp:ContentPlaceHolder>
    </div>
  </form>
</body>
</html>

The master page contains some common elements, like a head tag. The most important server-side controls are the form tag (form1) and the ContentPlaceHolder (ContentPlaceHolder1). Let’s also write a simple web form to use our master page.

<%@PageLanguage="C#"MasterPageFile="~/Master1.master"
         AutoEventWireup="true"Title="Untitled Page"  %>
<asp:ContentID="Content1"Runat="Server"
             ContentPlaceHolderID="ContentPlaceHolder1">
  <asp:LabelID="Label1"runat="server"Text="Hello, World"/>
</asp:Content>

Please vote if you find this solution helpful.

Thank you.


Related Solutions

. Explain in your own words what is meant by the term ‘price elasticity of demand’....
. Explain in your own words what is meant by the term ‘price elasticity of demand’. 2. Why is it important for business managers to understand price elasticity of demand? 3. When price elasticity of demand is greater than 1, we say that the good is: INELASTIC / ELASTIC / UNITARY ELASTIC / POSITIVELY ELASTIC 4. When price elasticity of demand is less than 1, we say that a good is: INELASTIC / ELASTIC / UNITARY ELASTIC / NEGATIVELY ELASTIC...
Explain the following in your own words (be specific): What is meant by a 95% confidence...
Explain the following in your own words (be specific): What is meant by a 95% confidence interval? What is meant by the true mean and how does it relate to the confidence interval? Explain Standard Error or Margin of error and how it helps define the confidence interval?
With respect to Ohm's Law, explain in your own words what is meant when it is...
With respect to Ohm's Law, explain in your own words what is meant when it is said that there is "a linear response between voltage and current." Name a specific device in which Ohm's Law is a good description of the relationship between current and voltage, and one for which it is not. Do your best to explain this failure in terms of the basic properties of electrons flowing through a conducting material. Describe the temperature response of resistors in...
( please in your own words) Explain what is meant by quality management and why is...
( please in your own words) Explain what is meant by quality management and why is it important?
  Explain in your own words what is meant by the phrase “arbitrage in financial markets”. Specify...
  Explain in your own words what is meant by the phrase “arbitrage in financial markets”. Specify how it relates to both interest rates and exchange rates.
In your own words, briefly explain what is meant by Social Psychology.  If you were to...
In your own words, briefly explain what is meant by Social Psychology.  If you were to research any question in the field of Social Psychology, what question would you seek to answer, and how might this differ from the questions asked by a related field, like Sociology or Personality Psychology?  What research methods would you use to address your question?  Explain why you chose this method and discuss ethical concerns associated with using this method.  Support your answer with scholarly...
In your own words, explain what is meant by an Array and ArrayList. Give two examples...
In your own words, explain what is meant by an Array and ArrayList. Give two examples that illustrate the main difference Note:Java programming language
In your own words, explain what is meant by OH&S risk and risk assessment.
In your own words, explain what is meant by OH&S risk and risk assessment.
In your own words, explain what is meant by ‘corporate social responsibility’. Provide two examples.
In your own words, explain what is meant by ‘corporate social responsibility’. Provide two examples.
a. In your own words, explain what is meant by good programming practice. Give two examples,...
a. In your own words, explain what is meant by good programming practice. Give two examples, one with good programming practice and one without good programming practice Note:java Programming Language
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT