简体   繁体   中英

how to store rich text data from CKEditor in ASP.NET Web Forms database..?

My question is very simple, please suggest me.

I am trying to create a simple blog system in ASP.Net.

I want to use CKEditor to give users the functionality of posting articles, just like wordpress.

i integrated CKEditor in my page, but having a problem.

How the data will be stores in the database, as it will be rich text data, including images, text etc. so how can it be stores in the single field in the database. and what will be the right way to retrieve it back to show as a article later.

having tough times, regarding this. I am working on ASP.Net Web Forms Technology.

tried to get reference from this post but may be it was for ASP.Net MVC.

Just save it as HTML text in a text (or related) typed column.

Maybe you should do some sanitization before, just to check it's compliant with your rules. CKEditor will send HTML of course but maybe someone could forge a post request sending whatever else, such as a <script> tag with some malicious code that will later be injected to your site.

If you tell me which DBMS you're using I can be more precise about colun type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM