hi,
first i develop a .aspx page. and after developing that i need to take one master page. i am taking a .master page.
my doubt is how to add the already created .aspx page to master page
please give a solution.
Thanks
Loading
Manikavelu VelayuthamPosted Oct 20, 2010, 7:55 AM
Below is the sample example to put your child page inside a master page.
In Master page you will have a ContentPlaceHolder, note down the id of it. That should be present in your child page.
1. MasterPageFile="~/MasterPage.master" --> This is the master page name
2. ContentPlaceHolderID="ContentPlaceHolder1" --> This is the ContentPlaceHolder id of the master page.
By doing this your child page will be inside the master page.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Form2.aspx.cs" Inherits="Form2" Title="Untitled Page" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>
p>
asp:Content>