问题描述
dwz+asp.net用ckeditor编辑器,取不到编辑器的值??但其它的值能取到,也能插入数据库,弄了好几天了清行,??没用dwz它自己带的编辑器,那个不能上传图片,要写代码吧,?代码:<divclass="pageContent"><formmethod="post"action="ajax/articleAdd.ashx"class="pageFormrequired-validate"onsubmit="returnvalidateCallback(this,dialogAjaxDone);"><divclass="pageFormContent"style="text-align:center;width:100%;"><dl><dt>文章标题:</dt><dd><inputname="bt"type="text"size="50"class="required"maxlength="50"/></dd></dl><dl><dt>文章分类:</dt><dd><inputtype="hidden"name="orgLookup.id"value="${orgLookup.id}"/><inputtype="text"class="required"name="fl"suggestFields="orgNum,orgName"suggestUrl="demo/database/db_lookupSuggest.html"lookupGroup="orgLookup"/><aclass="btnLook"href="demo/database/dwzOrgLookup.html"lookupGroup="orgLookup">查找带回</a></dd></dl><dl><dt>是否发布:</dt><dd><selectname="xs"class="requiredcombox"><optionvalue="false">否</option><optionvalue="true">是</option></select></dd></dl><dl><dt>录入时间:</dt><dd></dd><inputtype="text"name="rq"readonly="readonly"class="date"dateFmt="yyyy年MM月dd日"minDate="2016-01-01"maxDate="2020-12-31"/><aclass="inputDateButton"href="javascript:;">选择</a></dd></dl><dl><dt>文章版权:</dt><dd><inputtype="text"size="30"name="bq"/></dd></dl><dl><dt>操作人员:</dt><dd><inputreadonly="readonly"type="text"value=<%=czz%>size="30"name="cz"/></dd></dl><dlclass="nowrap"><textareaname="description"id="edt"rows="18"cols="100"class="ckeditor"></textarea><scripttype="text/javascript">if(CKEDITOR.instances["edt"]){CKEDITOR.remove(CKEDITOR.instances["edt"]);}vareditor=CKEDITOR.replace("edt");</script></dl></div><divclass="formBar"><ul><!--<li><aclass="buttonActive"href="javascript:;"><span>保存</span></a></li>--><li><divclass="buttonActive"><divclass="buttonContent"><buttontype="submit">保存<button></div></div></li><li><divclass="button"><divclass="buttonContent"><buttontype="button"class="close">取消</button></div></div></li></ul></div></form></div>articleAdd.ashx代码:<%@WebHandlerLanguage="C#"Class="articleAdd"%>usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingBLL;usingModel;usingSystem.Web.SessionState;publicclassarticleAdd:IHttpHandler,IRequiresSessionState{Articlea=newArticle();publicvoidProcessRequest(HttpContextcontext){intaid=Convert.ToInt32(context.Request.QueryString["aid"]);stringbt=context.Request.Form["bt"];intfl=Convert.ToInt32(context.Request.Form["fl"]);stringzw=context.Request.Form["description"];DateTimerq=System.DateTime.Now;//context.Request.Form["rq"];stringcz=context.Request.Form["cz"];boolxs=Convert.ToBoolean(context.Request.Form["xs"]);stringbq=context.Request.Form["bq"];stringfj="";//aid=1;if(aid>0){a.ID=aid;a.Bt=bt;a.Fl=fl;a.Xs=xs;a.Rq=rq;a.Cz=cz;a.Zw=zw;a.Bq=bq;a.Fj="";intcount=BLL.ArticleBll.InArticleBll(a);if(count>0){//context.Response.Write("{"statusCode":"200","message":"修改成功","navTabId":"A001","forwardUrl":"","callbackType":"closeCurrent"}");context.Response.Write("{"statusCode":"200","message":"修改成功","navTabId":"WZ01","forwardUrl":"","callbackType":"closeCurrent"}");}}else{a.Bt=bt;a.Fl=fl;a.Xs=xs;a.Rq=rq;a.Cz=cz;a.Zw=zw;a.Bq=bq;a.Fj="";//context.Response.Write(zw);intcount=BLL.ArticleBll.InArticleBll(a);if(count>0){//context.Response.Write("{"statusCode":"200","message":"添加成功","dialogId":"","forwardUrl":""}");context.Response.Write("{"statusCode":"200","message":"操作成功","navTabId":"WZ01","forwardUrl":"","callbackType":"closeCurrent"}");}else{context.Response.Write("{"statusCode":"300","message":"操作失败"}");}}}publicboolIsReusable{get{returnfalse;}}}求高手指点一下。
解决方案
解决方案二:
用kindeditor吧