解决方案 »
- 类似QQ截图功能
- 关于使用Visual Studio 2010 实现程序打包功能
- 怎样使用Precompile工具隐藏aspx,ascx表现层代码
- 请高手指教
- “http://域名/用户名”这样的伪静态怎样实现?
- 页面如何获取自定义控件中的DataTable?
- ASP.NET(C#) 操作dbf
- 在网页上显示一个xml文档,删除一个Node后,网页上仍然显示
- 紧急求救!!!!在框架中,top.aspx,left.aspx,right.aspx,三个页面,right.aspx经常出现上下和左右的滚动条,影响美观,同时对客户操作
- IEnumerator 只能MoveNext()向前滚,如何才能做到双向滚动啊?
- 这个日历插件有人用过吗?
- 客户信息被篡改,严重问题
http://www.cnblogs.com/akwwl/p/3184239.html
http://www.michielpost.nl/Silverlight/MultiFileUploader/
//上传控件设置
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/shangchuan.JPG"
onclick="ImageButton1_Click" />
//上传程序
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string serverPath = Server.MapPath("UpLoad"); //获取服务器端目录绝对路径
if (!System.IO.Directory.Exists(serverPath)) //如果不存在该目录
{
System.IO.Directory.CreateDirectory(serverPath); //创建该目录
}
if (FileUpload1.HasFile) //判断是否选择上传的文件
{
int filesize = FileUpload1.PostedFile.ContentLength / 1024 / 1024;//获取上传文件的大小
if (filesize > 8) //如果大于8M
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('只允许上传不大于8兆的文件');", true); //弹出提示信息
return;
}
else //否则
{
//使用SaveAs方法将上传的文件存储到服务器中
FileUpload1.SaveAs(serverPath + "\\" + FileUpload1.FileName);
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('上传成功');", true);
}
}
else //如果没有选择文件
{
//弹出提示信息
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('请选择文件');", true);
return;
}
自己搜搜
添加引用top4net.dll到你的程序中http://download.csdn.net/detail/sinbas/8028465
baidu api
http://developer.baidu.com/wiki/index.php?title=docs/pcs/rest/file_data_apis_list#.E4.B8.8A.E4.BC.A0.E5.8D.95.E4.B8.AA.E6.96.87.E4.BB.B6