refer:
protected void Page_Load(object sender, EventArgs e)
{
Button1.Click += (ss, ee) =>
{
string file = FileUpload1.FileName;
FileUpload1.PostedFile.SaveAs(@"D:\123\123.txt");
};
}
protected void Page_Load(object sender, EventArgs e)
{
Button1.Click += (ss, ee) =>
{
string file = FileUpload1.FileName;
FileUpload1.PostedFile.SaveAs(@"D:\123\123.txt");
};
}
解决方案 »
- datagridview CellContentClick事件
- 求一个 基于wince 6.0+ c#写的远程桌面连接有源码程序 !
- VB 中的Set语句
- 请教\r,\n,\r\n在实际使用中的区别
- 将字符串转换成字符串数组!!!简单吧!
- 询问SOCKET分块发送文件问题
- 急问::为什么我的程序一运行,数据库就自动断开?
- 菜鸟,弱弱的问一句,我在form1上放了一个textbox和一个label如果能让txb输入的文字即时显示于label上,不用提交
- WPF绑定技术(解释与代码)
- 远程访问问题!(Remoting Framwork)
- 请教一个多线程的问题???
- DirectShow如何采集音视频
<configSections>
<section name="UploadFilePath" type="~/UploadFile"/>
</configSections>
---2. 上传文件
string strPath=System.Configuration.ConfigurationManager.AppSettings["UploadFilePath"]
string uploadFilePath = HttpContext.Current.Server.MapPath(strPath);
string savePhysicalFile = Path.Combine(uploadFilePath, "aaaa.txt");
this.FileUpload1.SaveAs(savePhysicalFile);