问题描述
您好我正在使用HtmlInputFile控件将文件从客户端上传到
服务器。我有一个浏览器在服务器上找到该文件,但是需要动态地创建
路径它是否会基于一些下拉框,一年
为年一个月。这行保存文件所以我正在尝试
从下拉框中获取月份和年份并将它们放入月份
和年份变量但这不起作用,
File1.PostedFile.SaveAs((" c:\\temp \\" +" \\" + month +" \\" +年+
Text1.Value))
这些是我必须获得所选月份和年份的两行但是
var month = month_dropdrown.selectedindex;
var year = year_dropdrown.selectedindex;
但我收到编译错误,month_dropdown未定义。我正在使用
javascript。
我也尝试使用alert()打印变量但是得到了编译器
错误,(未定义) 。
谢谢
-
Paul G
软件工程师。
Hi I am using the HtmlInputFile control to upload a file from a client to a
server. I have a browse to find the file on the server but need to create
the path dynamically as to were it will go based on some dropdown boxes, one
for the year and one for the month. This line saves the file so I am trying
to get the month and year from the dropdown boxes and put them in the month
and year variables but this does not work,
File1.PostedFile.SaveAs(("c:\\temp\\" + "\\" + month + "\\" + year +
Text1.Value))
These are the 2 lines I have to get the selected month and year but
var month=month_dropdrown.selectedindex;
var year=year_dropdrown.selectedindex;
but I get a compiler error, month_dropdown not defined. I am using
javascript.
I also tried printing out the variables using alert() but got a compiler
error, (not defined).
thanks
--
Paul G
Software engineer.
推荐答案
这篇关于使用html控件从客户端下载文件到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!