Use this attachment here. It contains a .VBP and .asp Files. Compile the VB Project and make a DLL out of it.
Have a Interface ASP File and include the code in the UploadReceive.asp file here.
This should do the job. Get bac for clarifications, if any. Let me know if it worked.
Gilly, alternatively, try out Asp smart'supload control. it pretty nifty and it's also free which is always a good thing.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
Gilly,
If u created the DLL in system you are going to run the ASP, it should work. Otherwise, copy the DLL into the destination machine and register it.
BTW, did u mean it gave a "Server.CreateObject Failed - Invalid Class String" Error?
i need to be able to upload text/images/db etc. however i dont want to use a dll. i only want to use .asp and .htm files. Ive downloaded a few examples from the web which seem to work fine, unitl you try to download onto your server or client. It simply downloads the .asp file instead of the actual document you selected. ??
sorry for being unclear!! Ive attached an example to let you see exactly what i mean.
follow the steps once you unzip the file...
1. attach a file to upload
2. then download to your choosen location
3.open up the file you selected, it opens getnew.asp, instead of the actual document you selected for download.
You would be able to create some progress bar using javascript but i DONT think would be able to synchronise it with the actual upload process.
Alternatively what u can do is that as soon as someone clicks on upload - show a layer (div tag using javascript) which contains an image sort of showing the upload process - thus informing the user that something is going on - instead just showing him a blank screen.
WebClient class .NET upload method HELP!! 405 Error
There is a website that my company logs into everyday and uploads our credit card transactions every day in a text file. My boss wants me to create a program that completely automates this process without anybody having to log in. The browser upload control isnt what I am looking for. I am looking for back end code that allows me to grab our local text file every day and upload this text file to paypals server.
I assume that the WebClient class in .NET is my answer. using the System.Net namespace. It has an uploadfile method that allows the the program to upload a specified file. For example:
WebClient w = new WebClient();
w.uploadfile("http://www.aspxsoftware.com/collector/Transaction.txt", "POST", @"C:\Temp\Transaction.txt");
I keep getting the 405 method not allowed error. I have given my directory write permissions. I still get the error. I can upload files from one location in my directory to another. Example:
WebClient w = new WebClient();
//this code would transfer Transaction.txt file in Temp directory to CreditTrans directory.
w.uploadfile(@"C:\CreditTrans\Transaction.txt", "POST", @"C:\Temp\Transaction.txt");
The above code will work without errors.
The WebClient class also has a download method that I can also get to work fine. Example:
WebClient w = new WebClient();
w.downloadfile("http://www.aspxsoftware.com/collector/Transaction.txt", @"C:\Temp\Transaction.txt");
I just cant get the Upload method in the WebClient class to upload files to a specified directory with an http:// address. I cant even get it to work with my http://localhost address.
I keep getting the 405 error method not allowed. Does anybody know how to use the upload method in the WebClient class for .NET? Any suggestions would be helpful. Thanks.