积极答复者
FCKeditor 怎么获取它的值插入数据库中,然后又从数据库中读取数据

问题
-
protected void btnAddNew_Click(object sender, EventArgs e)
{
newsBLL newB = new newsBLL();
newsModel newM = new newsModel();
newM.News_Title = this.txtNewTitle.Text.Trim();
newM.News_Source = this.txtNewSource.Text.Trim();
newM.News_Time = this.txtNewData.Text.Trim();
newM.News_Hits = Convert.ToInt32( this.txtNewHot.Text);
newM.News_Content = this.FCKnewConter.Value;if (newB.addNewsBLL(newM) > 0)
{
Response.Write("添加成功");
}
else {
Response.Write("添加失败");
}
}
}能不能用这里获得fck的字段的值呢? newM.News_Content = this.FCKnewConter.Value;
如果这样子插入数据库的话,我用打gridview读取数据后,就变成这样子了
ewe <p>fsfsfsd<input type="image" height="240" width="180" src="/Web/fckeditor/editor/filemanager/connectors/Files/image/%E6%9C%AA%E5%91%BD%E5%90%8D.jpg" /></p>
you are welcome- 已移动 孟宪会Moderator 2011年3月7日 13:17 (发件人:Visual C#)
答案
全部回复
-
webbrowser
http://feiyun0112.cnblogs.com/ -
gridview的列有个HtmlEncode属性,把它设为false试试。
http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.boundfield.htmlencode(VS.80).aspx