-
大小: 4.75MB文件类型: .7z金币: 1下载: 0 次发布日期: 2023-09-15
- 语言: Html/CSS
- 标签: professional dhtmlxSuite
资源简介
dhtmlx 是一款非常好用的 javaScript 组件。这款是比较新版本,可以用。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace dhtmlxForm
{
///
/// Summary description for dhtmlxform_item_upload
///
public class dhtmlxform_item_upload : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
/*
HTML5/FLASH MODE
(MODE will detected on client side automaticaly. Working mode will passed to server as GET param “mode“)
response format
if upload was good you need to specify state=true and name - will passed in form.send() as serverName param
{state: ‘true‘ name: ‘filename‘}
*/
string filename = ““;
if (context.Request[“mode“] == “html5“ || context.Request[“mode“] == “flash“) {
filename = context.Request.Files[“file“].FileName;
context.Response.ContentType = “text/json“;
context.Response.Write(“{state: true name:‘“ + filename.Replace(“‘““\\‘“)+“‘}“);
}
/*
HTML4 MODE
response format:
to cancel uploading
{state: ‘cancelled‘}
if upload was good you need to specify state=true name - will passed in form.send() as serverName param size - filesize to update in list
{state: ‘true‘ name: ‘filename‘ size: 1234}
*/
if (context.Request[“mode“] == “html4“) {
context.Response.ContentType = “text/html“;
if (context.Request[“action“] == “cancel“) {
context.Response.Write(“{state:‘cancelled‘}“);
} else {
filename = context.Request.Files[“file“].FileName;
context.Response.Write(“{state: true name:‘“ + filename.Replace(“‘““\\‘“)+“‘ size:“ + context.Request.Files[“file“].ContentLength+“}“);
}
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
- 上一篇:大学生网页设计期末作业静态网页.zip
- 下一篇:angular-1.2.1.zip
评论
共有 条评论