01.
<%
Option
Explicit %>
02.
<html>
03.
<head>
04.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
>
05.
<title>ThaiCreate.Com ASP & aspSmartUpload</title>
06.
</head>
07.
<body>
08.
<%
09.
Dim
mySmartUpload
10.
11.
12.
Set
mySmartUpload = Server.CreateObject(
"aspSmartUpload.SmartUpload"
)
13.
mySmartUpload.CodePage =
"Windows-874"
14.
15.
16.
mySmartUpload.Upload
17.
18.
19.
Response.write(
"Fullname= "
&mySmartUpload.Form(
"txt1"
)&
"<br>"
)
20.
21.
22.
If
mySmartUpload.Files(
"file1"
).FileName <>
""
Then
23.
mySmartUpload.Files(
"file1"
).SaveAs(Server.MapPath(
"MyFiles/"
& mySmartUpload.Files(
"file1"
).FileName))
24.
Response.write mySmartUpload.Files(
"file1"
).Name &
" Uploaded.<br>"
25.
End
If
26.
27.
28.
If
mySmartUpload.Files(
"file2"
).FileName <>
""
Then
29.
mySmartUpload.Files(
"file2"
).SaveAs(Server.MapPath(
"MyFiles/"
& mySmartUpload.Files(
"file2"
).FileName))
30.
Response.write mySmartUpload.Files(
"file2"
).Name &
" Uploaded.<br>"
31.
End
IF
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
Set
mySmartUpload =
Nothing
45.
%>
46.
</body>
47.
</html>