Click here to Skip to main content
15,878,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys, am working on a CMS which has to do with blog posts.
I always create a new page for a new blog post so that it can be fetched by SEO and also easy reference.

<!-- Article Section -->

ARTICLE CONTENTS COMES IN HERE
 
<!-- Article End -->


Everything is working fine but how do i edit based on the article area.
I want to load the contents on the <!-- Article Section --> into a textbox and write changes to the page.
Am stuck here... pls share some ideas. Thanks
Posted

Use RichTextBoxEditor of asp.net
 
Share this answer
 
Use a TextEditor control to edit the content of the page as Html, then Save it to a page and replace it to the .aspx page using the literal control.

C#
<!-- .aspx-->
<!-- Article Section -->
<asp:literal id="ltHTMLBody" runat="server" xmlns:asp="#unknown"></asp:literal>  
<!-- Article End -->
<!-- .cs -->
ltHTMLBody.Text = "Your html content after edit";  

Ref.

https://msdn.microsoft.com/en-us/library/system.web.ui.literalcontrol(v=vs.110).aspx[^]
http://stackoverflow.com/questions/5508666/dynamically-add-html-to-asp-net-page[^]
Add HTML Page Contents to ASPX Page Programmatically[^]
 
Share this answer
 
Comments
[no name] 29-Jan-15 6:38am    
Thanks, I will give it a try..

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900