Click here to Skip to main content
15,077,265 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    <link href="Styles.css" rel="stylesheet" type="text/css" />
    <form id="form1" runat="server">
        <div id="topContent">
            <a href="Default.aspx">Master Pages Tutorials</a>
        <div id="mainContent">
            <asp:ContentPlaceHolder id="MainContent" runat="server" />
        <div id="leftContent">
            <p style="text-align: center;">
                <asp:Label ID="DateDisplay" runat="server" />

        <div id="footerContent">
            <img src="Images/PoweredByASPNET.gif" alt="Powered by ASP.NET!" />

In this page i want to open separate aspx page in content place holder
That means all the design of the master page will be same and I only make page design and call in contact place holder

I am new so plz help me and give solution
Updated 2-Jul-15 4:52am

1 solution

That's not quite right - the master page doesn't call the content pages to display them. Instead, the content page defines its master page, and the content to display inside the content placeholders.

ASP.NET Master Pages - MSDN[^]
Beginner's Tutorial on Master Pages in ASP.NET[^]

<%@ Page Language="C#" MasterPageFile="~/Site.master" Title="Content Page"%>

<asp:Content runat="server" ContentPlaceholderID="head">

(Header content goes here...)


<asp:Content runat="server" ContentPlaceholderID="MainContent">

(Main content goes here...)

satyashri 5-Jul-15 6:16am
Thanks for ur solution

I have aspx pages (like student master, course master)without master page and these are redirect (open) in one window or frame when I m click on specific master menu
(I use 4)
Then what ky I do plz help
Richard Deeming 6-Jul-15 9:33am
So you want to open specific pages in an iframe when you click on a link? You just need to set the target attribute[^] on the link to the match the id of the iframe.
satyashri 10-Jul-15 2:10am
Thanks it works

I want to menu panel like left side object explore in SQL server and menu generate dynamically through database
Plz help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900