What is ContentPlaceHolder in Masterpage in asp.net?


In this post, we will discuss contentplaceholders in master page in asp.net. Also, you can check out my previous posts on:


ExecuteNonQuery(), ExecuteReader() and ExecuteScalar() in Ado.Net

Singleton class in C#.Net

Cookieless session in Asp.Net

In ASP.NET Website development master page is frequently used. A master page defines a common structure, layout, navigation and default content for all of the web pages of a web application including headers, footers, style definitions, or navigation bars. The master page can be shared by any of the pages in the Web site, called the Content page. A content page is a web page that is connected to the master page and that displays its own individual content along with the content of the master page. The ContentPlaceHolder is used by the content page to display its own content.

Below is the ContentPlaceHolder tag:



<head runat=”server”>
<title>Untitled Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:ContentPlaceHolder ID=”ContentPlaceHolder1″ runat=”server”>
</asp:ContentPlaceHolder>
</div>
</form>
</body>

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →