Question

I have a using ASP.net C# firstly I have created a webform FrmFirst.aspx. Then I have created a master page. Now I have to add my first page to master page then I am facing the same error :

enter image description here

I am using this code to add my first page to Master page

 <%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="FrmCustomerMaster.aspx.cs" Inherits="FrmCustomerMaster" %>

Tell me my Problem !! Thanks ....

Was it helpful?

Solution

You need to change your body to content sections. The master page works with contentplaceholders: your content pages need to provide the content for these placeholders see LINK

if your master page contain this code

<asp:contentplaceholder id="Main" runat="server" />

your page that Inherits from master should have

<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">

</asp:Content>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top