为何上传文件超过2M就会出现错误呢?请高人指点,谢谢。
<script language="vb" runat="server">
sub Button1_Click(sender as object,e as eventargs)
dim strContent as string
if Upload.PostedFile.ContentLength<0 Then
Label1.text="上传失败"
else
strContent="文件名称:" & Upload.PostedFile.FileName
'strContent=strContent & "<br>档案大小:" & Cstr(Upload.PostedFile.ContentLength) & "Bytes"
'strContent=strContent & "<br>档案类型:" & Upload.PostedFile.ContentType
dim Temp() as string =split(Upload.PostedFile.FileName,"\")
dim name as string =Temp(Temp.Length-1)
Upload.PostedFile.SaveAs(Server.MapPath(".") & "\File\" & Name)
Label1.text=strContent
end if
end sub