作者taffy0825 (小六)
看板C_Sharp
标题[问题] ASP.NET存到资料库会变成HTML码
时间Wed Aug 4 12:03:40 2010
各位版大
我遇到一个搞了我很久的问题
我现在有用FCKeditor的控制项
我想要用把FCKeditor.Value这一个字串存进资料库
但存到资料库後会变成HTML的形式
因为我还要把这一个资料表叫出来分享
这样感觉很丑
try
{
SqlDataSource2.InsertParameters["FCK_id"].DefaultValue =
Label2.Text;
SqlDataSource2.InsertParameters["FCK_content"].DefaultValue =
FCKeditor1.Value;
SqlDataSource2.Insert();
GridView2.DataBind();
Label3.Text = "新增成功";
FCKeditor1.Value = "";
}
catch (Exception ex)
{
Label3.Text = "资料库写入发生错误:" + ex.Message;
}
以上是我新增的程式码
谢谢各位~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.123.175.223
1F:推 mosluce:HTML是为了保留你的内文样式... 08/04 17:06
2F:→ mosluce:你可以另外放一个只存文字不存样式的栏位 08/04 17:06