zoukankan
html css js c++ java
有关文件上传存储的问题
代码如下
<
%@ Page Language
=
"
vb
"
Debug
=
"
true
"
%
>
<
html
>
<
script language
=
"
vb
"
runat
=
server
>
Sub uploadfile()
sub
uploadfile(sender
as
object
, e
as
system.Eventargs)
dim
s
as
string
s
=
"
d:\updata\
"
&
system.io.path.getfilename(butimage.postedfile.filename)
butimage.postedfile.saveas(s)
end sub
</
script
>
<
body
>
<
form runat
=
"
server
"
enctype
=
"
multipart/form-data
"
>
<
input
type
=
file runat
=
server id
=
butimage
/><
br
>
<
input
type
=
button id
=
yesbutton onserverclick
=
uploadfile runat
=
server value
=
"
提交
"
/>
</
form
>
</
body
>
</
html
>
运行后出现问题如下:
“
/
fileup”应用程序中的服务器错误。
--------------------------------------------------------------------------------
未找到路径“d:
\
updata
\
boat.gif”的一部分。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.IO.DirectoryNotFoundException: 未找到路径“d:
\
updata
\
boat.gif”的一部分。
源错误:
行
7
:
dim
s
as
string
行
8
: s
=
"
d:\updata\
"
&
system.io.path.getfilename(butimage.postedfile.filename)
行
9
: butimage.postedfile.saveas(s)
行
10
:
行
11
:
end sub
源文件: c:
\
inetpub
\
wwwroot
\
fileup
\
index.aspx 行:
9
堆栈跟踪:
[DirectoryNotFoundException: 未找到路径“d:
\
updata
\
boat.gif”的一部分。]
System.IO.__Error.WinIOError(Int32 errorCode,
String
str
)
+
287
System.IO.FileStream..ctor(
String
path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize,
Boolean
useAsync,
String
msgPath,
Boolean
bFromProxy)
+
888
System.IO.FileStream..ctor(
String
path, FileMode mode)
+
52
System.Web.HttpPostedFile.SaveAs(
String
filename)
+
48
ASP.index_aspx.uploadfile(
Object
sender, EventArgs e)
in
c:
\
inetpub
\
wwwroot
\
fileup
\
index.aspx:
9
System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e)
+
108
System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(
String
eventArgument)
+
57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String
eventArgument)
+
18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+
138
System.Web.UI.Page.ProcessRequestMain()
+
1277
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:
1.1
.
4322.573
; ASP.NET 版本:
1.1
.
4322.573
请各位大侠帮我看看呀!
查看全文
相关阅读:
Sql例子Sp_ExecuteSql 带参数
Flex显示麦克风当前音量
无法将 flash.display::Sprite@156b7b1 转换为 mx.core.IUIComponent
FMS (端口问题)如何穿透防火墙
19:A*B问题
6264:走出迷宫
2753:走迷宫
1792:迷宫
换钱问题(经典枚举样例)
1943(2.1)
原文地址:https://www.cnblogs.com/aowind/p/107810.html
最新文章
idea 运行scala代码 报错:Exception in thread "main" java.lang.NoClassDefFoundError: scala/Predef$ java.lang.NoClassDefFoundError: scala/Function0 Error: A JNI error has occurred, please check your installati
scala combineByKey用法说明
spark 中如何查看单个RDD分区的内容(创建分区,查看分区数)
scalac:cannot connnect to compile server(idea 编译scala)
org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security .AccessControlException: Permission denied: user=Administrator, access=WRITE, inode="hadoop": hadoop:supergroup:rwxr-xr-x
Exception message: /bin/bash: line 0: fg: no job control
Error: java.lang.NullPointerException at outputformat.MysqlOutputFormat.getRecordWriter(MysqlOutputFormat.java:27)
hbase集群中其中某个regionserver 没有启动
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.o
ERROR:org.apache.hadoop.hbase.PleaseHoldException: Master is initializing 解决方案
热门文章
解决RStudio(非conda安装)在使用Anaconda中的R环境时,缺失“ libbz2-1.dll ”而不能正常启动问题
针对sklearn.svm中的"dual_coef_"理解
conda常用命令(待续)
win10 安装"pip install orange3" 出现LINK : fatal error LNK1158: cannot run 'rc.exe' 错误的解决办法
在VisualStudio 2012上使用MVC3出现错误的解决办法
FlashBuilder 4.7 破解方法
Flash设置全屏后,放到网页中显示不正常
as3.0服务端FMS软件常用的方法与属性参考示例
生物信息学数据库--介绍
Flex:在PANEL的title上加一个button[转]
Copyright © 2011-2022 走看看