//flash里传送值
'<param name="flashvars" value="' + this.getFlashVars() + '" />'
//flash里获取值
this.uploadURL=root.loaderinfo.parameters.uploadURL
SWFUpload.prototype.getFlashVars = function () {
//flash里传送值
'<param name="flashvars" value="' + this.getFlashVars() + '" />'
//flash里获取值
this.uploadURL=root.loaderinfo.parameters.uploadURL
SWFUpload.prototype.getFlashVars = function () {
import flash.net.FileReference;
import flash.net.URLRequest;
import flash.net.FileFilter;
import flash.display.Sprite;
import flash.events.*;
var fileRef = new FileReference();
var fileListener = new Object();
var totalBytes:Number = 0;
var uploadedBytes:Number = 0;
2.0.1npoi的dll文件下载:NPOI2.0.1.zip
public static void test1()
{
NpoiHelper np = new NpoiHelper();
DataTable dt1 = np.ReadExcel(AppDomain.CurrentDomain.BaseDirectory + "1测试数据.xls", 2).Tables[0];//读2003格式数据
DataSet ds1 = new DataSet();
ds1.Tables.Add(dt1.Copy());
ds1.AcceptChanges();
string SaveFileName = "output1.xls";
np.CreateExcel2003(SaveFileName, "sheet001", ds1, 0);//写2003格式数据
//返回值给父窗体
function returnParent(value) {//获取子窗体返回值
var parent = window.dialogArguments; //获取父页面
//parent.location.reload(); //刷新父页面
if (parent != null && parent != "undefined") {
window.returnValue = value; //返回值
function runToTop(){
currentPosition=document.documentElement.scrollTop || document.body.scrollTop;
currentPosition-=10;
if(currentPosition>0)
{
window.scrollTo(0,currentPosition);
}
using LitJson;
//可到 http://sourceforge.net/projects/litjson/?source=dlp 下载
protected void Page_Load(object sender, EventArgs e)
{
String str = "{'name':'j1','id':1,'items':[{'itemid':1001,'itemname':'it1'},{'itemid':1002,'itemname':'it2'}]}";
//*** 读取JSON字符串中的数据 *******************************
JsonData jd = JsonMapper.ToObject(str);
String name = (String)jd["name"];
int id = (int)(jd["id"]);
Response.Write(string.Format("name:{0},id:{1}<br/>",name,id));
JsonData jdItems = jd["items"];
}
public static string DataSetToJson(DataTable dt)
{
string json = string.Empty;
try
{
if (dt==null||dt.Rows.Count == 0)
{
return "";
}
json = "{";
json += "'table" + 1 + "':[";
for (int i = 0; i < dt.Rows.Count; i++)
#region 获取快递信息
string ApiKey = "XXXXXX";//请把XXXXXX修改成您在快递100网站申请的APIKey
//string powered = "快递数据由: <a href=\"http://www.kuaidi100.com/?refer=hishop&a=e8bc69faf6f1270b\" target=\"_blank\">快递100</a> 提供";
//技术文档地址:http://code.google.com/p/kuaidi-api/wiki/Open_API_API_URL
Dictionary<string, string> dict = new Dictionary<string, string>();
switch (typeCom)
{
case "AAE全球专递":
typeCom = "aae";
break;
case "安捷快递":
typeCom = "anjiekuaidi";
break;
<%:Html.DropDownList("AwardClassMainID","请选择")%>
<%:Html.DropDownList("SubID",new List<SelectListItem> { (new SelectListItem(){Text="请选择",Value="0"})})%>
//jquery代码
$("#AwardClassMainID").change(function () {
检查不能为空
[Required]
public string ID { get; set; }
检查最大长度