c# - html 编辑器属性

标签 c# asp.net ajaxcontroltoolkit html-editor

我在我的页面上使用了 AjaxControlToolkit html 编辑器:

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
TagPrefix="cc1" %>

<cc1:Editor ID="txtjobdesc" runat="server" AutoFocus="False"  />

我将值作为 txtjobdesc.Content.Tostring();

发送到数据库

但是,如果我在编辑器中只键入一个段落,它会显示相同的描述。 如果我使用任何项目符号和突出显示的单词,它会在下面显示带项目符号的单词和重叠单词。

如何让它显示为 html 描述?

请帮帮我..

最佳答案

将编辑器输出编码为 Server.HTMLencode(editor.content) 后发送到数据库,并以 Server.HTMLDecode(editor.content) 取回它

我非常确定它会起作用。

关于c# - html 编辑器属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2912496/

相关文章:

c# - 如何在 C# 中检索单选按钮的名称属性

c# - 未绑定(bind)模型项时如何添加 ModelState.AddModelError 消息

asp.net - 当控件为 runat=server 时如何应用 CSS id?

asp.net - 想要在 ModalPopupExtender 之上显示更新进度控件

c# - MaskedEditValidator 在使用 "en-GB"文化时导致 Page.IsValid 为假

c# - 依赖注入(inject)无法解析在 Azure 中运行的 .NET Core Function App 中的类型服务

c# - 大量的 BigInteger 日志问题

c# - wpf mvvm 中的 Datagrid SelectedIndex 在 RaisePropertyChanged 上设置为 0

c# - AngularJS 与 ASP.NET MVC 混淆

c# - AjaxUploadControl 不触发 onuploadcomplete 方法