![]() |
| ||
| How to add data to the content place holder at runtime 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. |
| ||
| Re: How to add data to the content place holder at runtime 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) |
| ||
| Re: How to add data to the content place holder at runtime Quote:
Thanks for the reply. but i cannot access 'Content1 ' in my '.cs' page.is there any other solution?? |
| ||
| Re: How to add data to the content place holder at runtime place your code, only your content place holder code like the above example, and I will try to help you. |
| ||
| Re: How to add data to the content place holder at runtime you can use another a[approach by using the new ASP.NET 2.0 control which called MultiView control and set the active view depending on selected dropdown item. http://www.c-sharpcorner.com/UploadF...a-393c43872384 |
| All times are GMT -4. The time now is 1:23 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC