简体   繁体   English

如何将CKEditor中的RTF文本数据存储在ASP.NET Web窗体数据库中?

[英]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. 我正在尝试在ASP.Net中创建一个简单的博客系统。

I want to use CKEditor to give users the functionality of posting articles, just like wordpress. 我想使用CKEditor为用户提供发布文章的功能,就像wordpress一样。

i integrated CKEditor in my page, but having a problem. 我在页面中集成了CKEditor,但是有问题。

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. 我正在研究ASP.Net Web窗体技术。

tried to get reference from this post but may be it was for ASP.Net MVC. 试图从这篇文章中获取参考,但可能是针对ASP.Net MVC的。

Just save it as HTML text in a text (or related) typed column. 只需将其另存为HTML文本(在文本(或相关)类型的列中)即可。

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. CKEditor当然会发送HTML,但是也许有人可以伪造一个后继请求,发送任何其他内容,例如带有一些恶意代码的<script>标记,这些恶意代码随后将注入到您的网站中。

If you tell me which DBMS you're using I can be more precise about colun type. 如果您告诉我您使用的是哪种DBMS,我可以更精确地了解colun类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从ASP.NET MVC中的Web表单清除数据? - How to clean data from web forms in asp.net mvc? Asp.net Web表单,Asp身份-如何存储来自Facebook,Twitter等的声明 - Asp.net web forms, Asp Identity - how to store claims from Facebook, Twitter, etc 使用自动完成功能通过c#从ASP.NET Web窗体的数据库中获取数据? - Use autocomplete to fetch data from Database in ASP.NET Web Forms with c#? 如何在asp.net Web表单中打开数据库? - How to open a database in asp.net web forms? 将数据从本地 excel 文件加载到 ASP.NET MVC web 应用程序以存储在数据库中 - Load data from local excel file to an ASP.NET MVC web app to store in database 如何在ASP.NET Web表单中验证此数据输入表单? - How to validate this data entry form in ASP.NET Web Forms? 如何从 asp.net web 表单中的 gridview 获取值? - how to get values from gridview in asp.net web forms? 如何使用asp.net Web API中的webApi将结果存储到数据库中? - How to consume a webApi from asp.net Web API to store result in database? 如何显示从ASP.NET Web应用程序到Xamarin.Forms的数据? - How to show data from ASP.NET Web Application to Xamarin.Forms? 如何从ASP.NET Web表单的HttpRequest主体读取数据 - How to read data from HttpRequest body in asp.net web forms
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM