Hey venkatg,
Don't put your code inside ContentPlaceHolder, put your code inside a panel and make it visible false.
If you place your content inside ContentPlaceHolder then it will be replaced by content page contents.
Please refer below sample.
HTML
MasterPage.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="MasEmployeeStatus" runat="server">
</asp:ContentPlaceHolder>
<asp:Panel runat="server" Visible="false" ID="pnlMasEmployeeStatus">
<div style="width: 100%; background-color: #284b59; color: Yellow; font-weight: bold;
font-family: Calibri; margin-bottom: 10px;">
<div align="right" style='padding-right: 10px;'>
<asp:Label ID="Label1" runat="server" Text="Test" Style="float: right; padding-left: 30px;
padding-right: 30px"></asp:Label>
<ul class="enlarge">
<li>
<asp:Image ID="Image1" runat="server" CssClass="ThumbNail" meta:resourcekey="imgThumbNailPhotoResource1" />
<asp:Image ID="Image2" runat="server" CssClass="ThumbNail" Visible="False" meta:resourcekey="imgThumbNailSignResource1" />
<span>
<img id="img1" alt="Employee's Photo" runat="server" class="ThumbNailFullImage" />
<img id="img2" alt="Employee's Signature" runat="server" class="ThumbNailFullImage" />
</span></li>
</ul>
</div>
</div>
</asp:Panel>
<hr />
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Default.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MasEmployeeStatus" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
Default Page.
</asp:Content>
CS.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="CS.aspx.cs" Inherits="CS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MasEmployeeStatus" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
CS Page
</asp:Content>
Code
C#
Default.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
(this.Master.FindControl("pnlMasEmployeeStatus") as Panel).Visible = true;
}
VB.Net
Default.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
TryCast(Me.Master.FindControl("pnlMasEmployeeStatus"), Panel).Visible = True
End Sub