Jquery ajax 怎样实现无刷新的文件上传
答案:2 悬赏:50 手机版
解决时间 2021-03-03 09:07
- 提问者网友:自食苦果
- 2021-03-02 14:58
Jquery ajax 怎样实现无刷新的文件上传
最佳答案
- 五星知识达人网友:思契十里
- 2021-03-02 15:13
用ajax提交FormData 到后台处理。正好我写了一个文件上传的例子,带进度条的。需要的话可以发给你
全部回答
- 1楼网友:鸽屿
- 2021-03-02 16:08
using system.data.oledb;
using system.data;
namespace _211
{
///
/// dbquery 的摘要说明。
///
public sealed class dbquery
{
static oledbconnection conn=dbconnection.getconn();
static datatable dt;
public static datatable openquery(string sql)
{
oledbdataadapter da=new oledbdataadapter(sql,conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename)
{
oledbdataadapter da=new oledbdataadapter("select * from "+tablename,conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename,int count)
{
oledbdataadapter da=new oledbdataadapter("select top "+count.tostring()+" * from "+tablename,conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename,string indexcolumn,bool isasc)
{
oledbdataadapter da=new oledbdataadapter("select * from "+tablename+" order by "+indexcolumn+" "+(isasc?"asc":"desc"),conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename,int count,string indexcolumn,bool isasc)
{
oledbdataadapter da=new oledbdataadapter("select top "+count.tostring()+" * from "+tablename+" order by "+indexcolumn+" "+(isasc?"asc":"desc"),conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename,string[] column,bool iscondition)
{
string tempsql="";
for(int i=0;i":"<")+"(select "+(isasc?"max":"min")+"("+indexcolumn+") from "+tablename+" where "+indexcolumn+" in (select top "+(page*pagesize)+" "+indexcolumn+" from "+tablename+" order by "+indexcolumn+" "+(isasc?"asc":"desc")+")) order by "+indexcolumn+" "+(isasc?"asc":"desc");
oledbdataadapter da=new oledbdataadapter(sql,conn);
dt=new datatable();
try
{
da.fill(dt);
}
catch(exception ex)
{
throw ex;
}
finally
{
da.dispose();
}
return dt;
}
public static datatable opentable(string tablename,string[] column,string[] condition,string indexcolumn,bool isasc,int pagesize,int page)
{
string tempsql="";
string tempsql2="";
for(int i=0;i
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯