code here
the problem i on path1
when i set path1 = server.mappath(".") + "\"+ xfile.name the compiler show me System.ArgumentException: Parameter is not valid.
when i set path1 ="C:\Documents and Settings\IT2\Desktop\web\resize\IMG_0989.JPG" it no problem
i tried response.write (server.mappath(".") + "\"+ xfile.name) and response.write ("C:\Documents and Settings\IT2\Desktop\web\resize\IMG_0989.JPG")
and both value is totaly same
CODE
<%@ Page Language="VB" debug="true"%>
<%@ Import Namespace="System.IO" %>
<%@ import namespace="System.Diagnostics" %>
<%@ Import Namespace="Microsoft.Win32" %>
<%@ Import Namespace="System.Drawing" %>
<script language="VB" runat="server">
sub page_load()
dim url as string = server.MapPath(".") & "\"
dim mydir as new DirectoryInfo(url)
dim hupo as string
dim xfile as fileinfo
For each xfile in mydir.getfiles()
Dim pic1 as bitmap
'response.write ( "<br>")
Dim path1 as String
path1 = server.mappath(".") + "\"+ xfile.name
'path1 ="C:\Documents and Settings\IT2\Desktop\web\resize\IMG_0989.JPG"
'response.write ( server.mappath(".") + "\"+ xfile.name +"<br>")
'Dim path1 as String ="IMG_0990.JPG"
'response.write (path1)
' pic1 = new bitmap(100,100)
pic1 = new bitmap(path1)
'response.write("created")
pic1.save(response.outputstream,System.Drawing.Imaging.ImageFormat.jpeg)
' pic1.save("c:\temp\" & xfile.name &".jpg",System.Drawing.Imaging.ImageFormat.jpeg)
pic1.Dispose()
Next
end sub
</script>
This post has been edited by zonlee: Jan 21 2006, 05:58 PM
Jan 21 2006, 05:54 PM, updated 20y ago
Quote
0.0152sec
0.35
5 queries
GZIP Disabled