If you want you can expose an asp:placeholder as a property from your master page code behind, see my example below:-
Main Topics
Browse All TopicsHi.
Is it possible to add a control to a Master Page's contentpage ( NOT the contentPlaceHolder in the MasterPage)
I need to add it from the contentpage's codebehind, not the MasterPage's codebehind
Like this:
Masterpage:
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
Home.aspx:
<asp:Content ID="Content1" ContentPlaceHolderID="Cont
Home.aspx.cs:
Label lbl1 = new Label();
lbl1.Text="Hello world!";
this.Content1.Controls.Add
--------------------------
I dont want to use Findcontrol as I hear this is not a very good practice.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks, but I dont want to add PlaceHolder propertiies to my masterpage - I already have a contentplaceholder
I just want to know why the following code doesnt work:
Home.aspx:
<asp:Content ID="Content1" ContentPlaceHolderID="Cont
Home.aspx.cs:
Label lbl1 = new Label();
lbl1.Text="Hello world!";
this.Content1.Controls.Add
Business Accounts
Answer for Membership
by: McExpPosted on 2007-12-09 at 14:43:06ID: 20438466
If used correctly there is nothing wrong with FindControl, in many cases when doing dynamic control creation it's the only solution.
I'm not quite sure what you need to do.
If you want to be able to overide sections of the Master page then you add a ContentPlaceholder and modify the contents of that from your content page. what was your example trying to show?