1.前端引用

<%@ Page ValidateRequest="false" Language="C#"   AutoEventWireup="true"   CodeBehind="ProductsAdd.aspx.cs" Inherits="Maticsoft.Web.Manager.ProductsAdd"   %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="utf8-net/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="utf8-net/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="utf8-net/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript"> //实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('txtEditorContents');
</script>
<script type="text/javascript">
function previewFile() {
var preview = document.querySelector('img');
var file = document.querySelector('input[type=file]').files[0];
var reader = new FileReader();
reader.onloadend = function () {
preview.src = reader.result;
}
if (file) {
reader.readAsDataURL(file);
} else {
preview.src = "";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="place">
<span>位置:</span>
<ul class="placeul">
<li><a href="#">首页</a></li>
<li><a href="#">表单</a></li>
</ul>
</div>
<div class="formbody">
<div class="formtitle"><span>基本信息</span></div>
<ul class="forminfo">
<li>
<label>商品名</label><input name="txt_name" type="text" class="dfinput" runat="server" id="txt_name" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="商品名不能为空!" ControlToValidate="txt_name" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>商品分类</label>
<asp:DropDownList ID="DropDownList2" runat="server" Height="29px" Width="193px">
</asp:DropDownList>
</li>
<li>
<label>商品单价</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text2" /> </li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="价格不能为空!" ControlToValidate="Text2" ForeColor="Red"></asp:RequiredFieldValidator> <li>
<label>批发价</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text3" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="价格不能为空!" ControlToValidate="Text3" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>单位</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text1" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="单位不能为空!" ControlToValidate="Text1" ForeColor="Red"></asp:RequiredFieldValidator>
<%-- <li>
<label>商品介绍</label><textarea name="txta" style="width: 499px; height: 41px" id="Textarea4" runat="server"></textarea>
</li>--%>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="商品介绍不能为空!" ControlToValidate="Textarea4"></asp:RequiredFieldValidator>--%>
<li>
<label>商品图片</label><asp:FileUpload ID="FileUpload" runat="server" onchange="previewFile()" />
<asp:Image ID="preview" runat="server" Height="42px" Width="46px" />
</li>
<li>
<label>备注</label><textarea name="txta1" style="width: 479px; height: 41px" id="Textarea1" runat="server"></textarea>
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="备注不能为空!" ControlToValidate="Textarea1" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>销量</label>
<asp:TextBox ID="TextBox1" runat="server" CssClass="dfinput"></asp:TextBox>
</li>
<li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="销量不能为空!" ControlToValidate="TextBox1" ForeColor="Red"></asp:RequiredFieldValidator>
</li>
<li>
<label>是否热门</label>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">热销</asp:ListItem>
<asp:ListItem Value="0">不热销</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>推荐</label>
<asp:DropDownList ID="DropDownList3" runat="server">
<asp:ListItem Value="1">推荐</asp:ListItem>
<asp:ListItem Value="0">不推荐</asp:ListItem>
</asp:DropDownList>
</li> <li>
<label>新品</label>
<asp:DropDownList ID="DropDownList4" runat="server">
<asp:ListItem Value="1">新品</asp:ListItem>
<asp:ListItem Value="0">不是新品</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>优惠</label>
<asp:DropDownList ID="DropDownList5" runat="server">
<asp:ListItem Value="1">优惠</asp:ListItem>
<asp:ListItem Value="0">不优惠</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>轮播图</label>
<asp:DropDownList ID="DropDownList6" runat="server">
<asp:ListItem Value="1">宣传</asp:ListItem>
<asp:ListItem Value="0">不宣传</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>是否下架</label>
<asp:DropDownList ID="DropDownList7" runat="server">
<asp:ListItem Value="0">否</asp:ListItem>
<asp:ListItem Value="1">是</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>颜色</label>
<asp:TextBox ID="TextBox2" runat="server" CssClass="dfinput" placeholder="颜色要以逗号分隔开比如:黄,红" Height="28px" Width="378px"></asp:TextBox>
</li>
<li>
<asp:TextBox ID="txtEditorContents" name="txtEditorContents" runat="server" TextMode="MultiLine" Height="200px" Width="1000px" ClientIDMode="Static "> </asp:TextBox><asp:Button ID="btn_add" runat="server" Text="确认添加" CssClass="btn" OnClick="btn_add_Click" Height="39px" Width="121px" OnClientClick="getcked()" />
</li> </ul> </div>
</form>
</body>
</html>

2.后台赋值

 model.P_text = txtEditorContents.Text;

下载地址:链接:https://pan.baidu.com/s/1pJmEsR2LUJCljkNBuqabpA 密码:0r18


.net百度编辑器的使用的更多相关文章

  1. 一步步开发自己的博客 .NET版(4、文章发布功能)百度编辑器

    前言 这次开发的博客主要功能或特点: 第一:可以兼容各终端,特别是手机端. 第二:到时会用到大量html5,炫啊. 第三:导入博客园的精华文章,并做分类.(不要封我) 第四:做个插件,任何网站上的技术 ...

  2. 关于百度编辑器UEditor的一点说明

    大家在使用的时候要特别注意editor_config.js中的“URL”这个参数 我的理解:1.这个参数是editor整个结构的总路径          2.首先要把这个路径配置好了.才能正常的显示, ...

  3. 百度编辑器ueditor插入表格没有边框颜色的解决方法

    附:从word excel 中 复制的表格提交后无边框,参考这个同学的,写的很详细:   http://blog.csdn.net/lovelyelfpop/article/details/51678 ...

  4. 百度编辑器UEditor的使用方法

    百度编辑器具有丰富文本编辑功能,且开源免费,其使用方法如下: 1.在官网上下载对应的Uditor压缩包:http://ueditor.baidu.com/website/download.html 2 ...

  5. 百度编辑器ueditor插入表格没有边框,没有颜色的解决方法 2015-01-06 09:24 98人阅读 评论(0) 收藏

    百度富文本编辑器..很强大.. - - ,不过有些BUG..真的很无解.. 最近用这个,发现上传的表格全部没有表框.. 解决办法如下: 转载的.. 百度编辑器ueditor插入一个表格后,在编辑过程中 ...

  6. UEditor百度编辑器,工具栏上自定义添加一个普通按钮

    添加一个名叫“hougelou”的普通按钮在工具栏上: 第一步:找到ueditor.config.js文件中的toolbars数组,增加一个“hougelou”字符串,然后找到labelMap数组,对 ...

  7. 百度编辑器 ueditor 内容编辑自动套P标签,及p标签 替换

    如图,红框为回车键和shift+回车 :    ===>>  ueditor.all.js中: 1: 搜索修改成false:allowDivTransToP: false 再搜索并修改以下 ...

  8. 百度编辑器ueditor 异步加载时,初始化没办法赋值bug解决方法

    百度编辑器ueditor 异步加载时,初始化没办法赋值bug解决方法 金刚 前端 ueditor 初始化 因项目中使用了百度编辑器——ueditor.整体来说性能还不错. 发现问题 我在做一个编辑页面 ...

  9. yii2解决百度编辑器umeditor图片上传问题

    作者:白狼 出处:http://www.manks.top/article/yii2_umeditor_upload本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原 ...

  10. yii2整合百度编辑器umeditor

    作者:白狼 出处:www.manks.top/article/yii2_umeditor 本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责 ...

随机推荐

  1. 记录:禁用你的元素 bootstrap

    记录:禁用你的元素 bootstrap <script> $(document).ready(function() { $("#target1").css(" ...

  2. EMC EMI 自行评估记录

    EMC EMI 自行评估记录 设备 频谱仪 网房 评估 设置频谱频率为 30M 1G. 给频谱仪接一个天线,将被测试的机器上电然后在不同的角度换,看频谱仪上的数值. 可以绕上去,但不要和 PCB接触.

  3. 突破本地离线存储的JS库 localforage

    localforage 简介 项目地址 https://github.com/localForage/localForage API中文地址 https://localforage.docschina ...

  4. Executor与ExecutorService

    ExecutorService 接口继承了 Executor 接口,是 Executor 的子接口. Executor 接口定义了 execute()方法用来接收一个Runnable接口的对象,而 E ...

  5. Zookeeper Java API调用

    引入zookeeper-3.4.11.jar public class ZooKeeperTest implements Watcher{ //public final static String z ...

  6. 配置Hanlp自然语言处理进阶

    中文分词 中文分词中有众多分词工具,如结巴.hanlp.盘古分词器.庖丁解牛分词等:其中庖丁解牛分词仅仅支持java,分词是HanLP最基础的功能,HanLP实现了许多种分词算法,每个分词器都支持特定 ...

  7. 计算MySQL的内存峰值公式 (转)

    -- 计算MySQL的内存峰值公式,计算所有的连接满了的情况下: select (@@key_buffer_size + @@query_cache_size + @@tmp_table_size   ...

  8. Java Base64编码

    使用commons-codec, 下载地址 http://commons.apache.org/proper/commons-codec/ 下载commons-codec-1.12-bin.zip,解 ...

  9. sql clr项目注意

    1.如果引用了其他第三方的dll没有在系统里注册的话会报错,需要手工引用,引用的时候可能需要不安全的使用授权,如果没有权限则使用以下语句获取 alter database Class01New_Cac ...

  10. 关于namespace的使用

    #include <string> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> int main ...