如何在服务器端保存文件 [英] how to save file on server side

查看:98
本文介绍了如何在服务器端保存文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个页面上有一个文件上传控件,在那个页面上我正在调用一个弹出窗口。

我必须在服务器端保存文件,但不能在弹出页面上保存。

它必须保存在主页面上的按钮点击事件中。



所以请告诉我如何在主页面中保存文件代码。

There is a file upload control on one page and on that page I am calling a popup.
I have to save the file on the server side but not on the popup page.
It has to be saved on button click event which is on the main page.

So please let me know how to save the file in main page code.

推荐答案

尝试

http: //support.microsoft.com/kb/323246 [ ^ ]


在asp.net中尝试此代码按钮点击:



Try this code in asp.net button click:

Fileuploadcontrolid.PostedFile.SaveAs(file name with location);


这篇关于如何在服务器端保存文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆