-
大小: 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
評論
共有 條評論