AspUpload and AspEmail Problems!!!

R

riteshjain82

Hi,
I am new to ASP and am maintaining a site which is written in ASP. The
problem is that i want to make a page which has an upload functionality
in it. It should let users upload a file to a web server(say
http://xyz.com).
Later i want that file to be emailed to some other person
automatically. I have the email part working correctly. We have
AspUpload component installed on our webserver. Now, i want to ask what
is the path that i should give in my upload.asp file so that the file
gets uploaded to a folder ' Data ' on http://xyz.com. The path is
something like this: http://xyz.com/Data

But everytime i try giving a path it either says the path not found or
the syntax is incorrect.

Please help me with the correct syntax that i should give. This is
really urgent.
 
M

Mike Brind

Hi,
I am new to ASP and am maintaining a site which is written in ASP. The
problem is that i want to make a page which has an upload functionality
in it. It should let users upload a file to a web server(say
http://xyz.com).
Later i want that file to be emailed to some other person
automatically. I have the email part working correctly. We have
AspUpload component installed on our webserver. Now, i want to ask what
is the path that i should give in my upload.asp file so that the file
gets uploaded to a folder ' Data ' on http://xyz.com. The path is
something like this: http://xyz.com/Data

But everytime i try giving a path it either says the path not found or
the syntax is incorrect.

Please help me with the correct syntax that i should give. This is
really urgent.

http://xyz.com/Data is not a path - it's a URL.

Create a file called mappath.asp and put this code in it:

<%
response.write Server.MapPath("mappath.asp")
%>

Then upload it to your Data directory. Once that's done, browse to it
(in your example, that would be http://xyz.com/Data/mappath.asp. What
you see written to your browser is the full path to the Data directory
on your web server. Use that.

Alternatively, you can use Server.mappath method to obtain a relative
path:
http://www.microsoft.com/windows200...indows2000/en/server/iis/htm/asp/vbob98iw.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top