asp.net中kindeditor4.1.7用法及配置图片上传,图片批量上传(VS2010)
来源:互联网 发布:将表格相同数据求和 编辑:程序博客网 时间:2024/05/21 17:02
从官网下载kindeditor4.1.7:
1、将文件夹复制到VS2010
2、将文件 LitJSON.dll 复制到web\bin目录下,并添加引用
3、修改file_manager_json.ashx文件中的图片保存目录
String rootUrl = aspxUrl + "Uploads/";
4、修改upload_json.ashx文件中的图片保存目录
//文件保存目录路径
String savePath = "Uploads/";
//文件保存目录URL
String saveUrl = aspxUrl + "Uploads/";
5、修改kindeditor417\plugins\image\images.js文件(原文件为PHP的配置)
uploadJson = K.undef(self.uploadJson, self.basePath + 'asp.net/upload_json.ashx'),
6、页面:
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MsRigth.Master" AutoEventWireup="true" ValidateRequest="false" CodeBehind="StudentPhotoAdd.aspx.cs" Inherits="WebSite.Web.admin.StudentPhotoAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<meta charset="utf-8" />
<link rel="stylesheet" href="kindeditor417/themes/default/default.css" />
<link href="kindeditor417/plugins/code/prettify.css" rel="stylesheet" type="text/css" />
<script charset="utf-8" src="kindeditor417/plugins/code/prettify.js" type="text/javascript"></script>
<script charset="utf-8" src="kindeditor417/lang/zh_CN.js" type="text/javascript"></script>
<script charset="utf-8" src="kindeditor417/kindeditor.js" type="text/javascript"></script>
<script type="text/javascript">
KindEditor.ready(function (K) {
var editor1 = K.create('#editor', {
cssPath: 'kindeditor417/plugins/code/prettify.css',
uploadJson: 'upload_json.ashx',
fileManagerJson: 'file_manager_json.ashx',
allowFileManager: true,
syncType: "auto",
afterCreate: function () {
var self = this;
KindEditor.ctrl(document, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
KindEditor.ctrl(self.edit.doc, 13, function () {
self.sync();
KindEditor('form[name=example]')[0].submit();
});
},
afterChange: function () { this.sync(); },
afterBlur: function () { editor1.sync(); }
});
prettyPrint();
}); </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
添加学生照片
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<textarea id="editor" name="content" style="width:700px;height:300px;"></textarea>
</asp:Content>
注意:
整个配置过程中,需要注意upload_json.ashx、file_manager_json.ashx等文件的路径问题
OK
- asp.net中kindeditor4.1.7用法及配置图片上传,图片批量上传(VS2010)
- kindeditor4.1.10图片上传配置及使用说明
- kindeditor4.1.8以前版本批量上传图片与swfupload冲突
- asp.net批量上传图片的实例
- 关于Asp.Net Mvc3.0 使用KindEditor4.0 上传图片与文件
- 关于Asp.Net Mvc3.0 使用KindEditor4.0 上传图片与文件
- Asp.net单按钮上传文件和批量上传图片
- asp.net上传图片
- asp.net上传图片
- asp.net上传图片
- ASP.NET图片上传
- asp.net上传图片
- asp.net上传图片
- asp.net 图片上传
- asp.net 上传图片
- asp.net上传图片
- ASP.NET图片上传
- asp.net 上传图片
- redis-2.8.13 安装
- Java程序员的JavaScript学习笔记(汇总目录)
- MySQL索引类型一览 让MySQL高效运行起来
- Android Service 服务及生命周期
- Radon变换简介
- asp.net中kindeditor4.1.7用法及配置图片上传,图片批量上传(VS2010)
- 超连接执行javascript
- MySQL索引类型 normal, unique, full text
- 对MVC模式的理解
- 命名空间学习~~~
- typedef和#define的用法与区别
- 关于Dos窗口的设置
- 为什么微信开始限制公共账号,营销号该如何转型
- Ising模型(伊辛模型)