hi all,

i am developing a content management system in asp.net with C#. i have a master page named "Master1.master" with 5 content place holders-"cphHeader, cphLeft,cphCenter,cphright,cphbottom". i have another default.aspx page which is inherited from the "Master1.master". it takes as input,the following fields from the user :
1. text to be displayed.(Textbox)
2. Content holder where the text will be displayed (dropdown having names of all the 5 content holders mentioned above.).
these things entered by the user are stored in the database. The text entered by the user should be displayed in the content holder mentioned above.

How do i do it?? is there any facility which helps us access the content place holders on the default.aspx.cs page.

thanks in advance.please reply as soon as possible.

you access your content tags.
they look like this.

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></asp:Content>

then you just call it from the c# code by id
ex.
Content1.Controls.Add(acontrolfilledwithcontent)

you access your content tags.
they look like this.
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></asp:Content>

then you just call it from the c# code by id
ex.
Content1.Controls.Add(acontrolfilledwithcontent)

Thanks for the reply. but i cannot access 'Content1 ' in my '.cs' page.is there any other solution??

This article has been dead for over six months. Start a new discussion instead.