Dzwebs.Net

撰写电脑技术杂文十余年

xheditor多个实例,如何在后台取值

Admin | 2014-7-15 8:57:01 | 被阅次数 | 6173

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

  关于xheditor富文本框的配置,在本站中已有详细的说明了,如果你想学习配置方面的资料,请查阅:http://www.dzwebs.net/4593.html

  下面本文给您重点讲解的是:如何在页面中引用多个实例,如何在后台取得xheditor的值,以便保存到数据库。

  一、同一页面引用多个xheditor实例

  第一个实例:代码加在BODY范围之内

  <textarea name="content1" class="xheditor {cleanPaste:2,upImgUrl:'upload.aspx',emotPath:'MyEditor/xheditor_emot/'}"  style="width:930px; height:330px;">这里是内容</textarea>

  第二个实例:代码加在BODY范围之内

  <textarea name="content2" class="xheditor {cleanPaste:2,upImgUrl:'upload.aspx',emotPath:'MyEditor/xheditor_emot/'}"  style="width:930px; height:330px;">这里是内容</textarea>

  第三个实例:代码加在BODY范围之内

  <textarea name="content3" class="xheditor {cleanPaste:2,upImgUrl:'upload.aspx',emotPath:'MyEditor/xheditor_emot/'}"  style="width:930px; height:330px;">这里是内容</textarea>

  其它以此类推,很多地方都相同,唯一不同的是富文本框的name有所区别,可自行修改。

  二、在后台获取xheditor的值

  通过下面这样的代码即可获取值。

  System.Web.HttpContext.Current.Request.Form["content1"].Trim();

  System.Web.HttpContext.Current.Request.Form["content2"].Trim();

  System.Web.HttpContext.Current.Request.Form["content3"].Trim();


该杂文来自: 网站开发杂文

上一篇:checkboxlist不换行、通过代码选中某几项

下一篇:设置TextBox文本框为密码格式

网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计