Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
What is placeholder and ContentPlaceHolder??
And when are thsese used in Web pages
Posted 20-Jan-13 21:35pm
Tejal S1.9K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

PlaceHolder: It is used to dynamically add controls on a web page. This[^] example shows how to use it.
 
ContentPlaceHolder: It is used in master pages to define the area that will be filled by content pages at runtime. This[^] example shows how to use it.
  Permalink  
Comments
Shona22 at 21-Jan-13 3:56am
   
Thnk u :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

A PlaceHolder control is used as a container for any controls you wish to add and can be used on any page. A ContentPlaceHolder is used to hold content from Content Pages and can only be used on a Master Page.
 
Look here for documentation on MSDN:
 
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.contentplaceholder.aspx[^]
 
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.placeholder.aspx[^]
  Permalink  
Comments
Shona22 at 21-Jan-13 3:56am
   
Thnk u :)

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

  Print Answers RSS
0 OriginalGriff 7,355
1 DamithSL 5,199
2 Sergey Alexandrovich Kryukov 4,942
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100