NEWBIE: Need help with WebClient.UploadFile() 
Author Message
 NEWBIE: Need help with WebClient.UploadFile()

Okay, I have been using ASP for several years, and ASP.NET (c#) for the last
couple of months.  I have very little 'real' programming experience.
Here is my scenario.

A user, using AutoDesk MapGuide saves a mapguide file to a specific location
via the web (no problem there).
What I need is to create a client-side control that I can pass the filename
and server address to and have it upload that file to the server without the
user having to do anything.

After the file is uploaded, I want to delete the file.

Now, I can do this in a console app using WebClient.UploadFile() and typing
in the filepath and url.  But I'm having problems with creating a control to
accept the two parameters and do the job.

Any assistance would be greatly appreciated.



Mon, 25 Oct 2004 01:50:34 GMT  
 NEWBIE: Need help with WebClient.UploadFile()
Carlos,

    Why not slap two textboxes and a button on a control derived from
UserControl and use that?  Textbox 1 would take the url that will accept the
file upload and textbox 2 would have the file to upload.  When the WebClient
is done uploading the file, then you can delete the file using the static
Delete method on the System.IO.File class.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]



Quote:
> Okay, I have been using ASP for several years, and ASP.NET (c#) for the
last
> couple of months.  I have very little 'real' programming experience.
> Here is my scenario.

> A user, using AutoDesk MapGuide saves a mapguide file to a specific
location
> via the web (no problem there).
> What I need is to create a client-side control that I can pass the
filename
> and server address to and have it upload that file to the server without
the
> user having to do anything.

> After the file is uploaded, I want to delete the file.

> Now, I can do this in a console app using WebClient.UploadFile() and
typing
> in the filepath and url.  But I'm having problems with creating a control
to
> accept the two parameters and do the job.

> Any assistance would be greatly appreciated.



Mon, 25 Oct 2004 02:12:25 GMT  
 NEWBIE: Need help with WebClient.UploadFile()
I try this, but the problem is that the UserControl is running from the
server,
and the server looks to itself for the filepath.  I need this to run on the
client machine
so the filepath will be valid.



Quote:
> Carlos,

>     Why not slap two textboxes and a button on a control derived from
> UserControl and use that?  Textbox 1 would take the url that will accept
the
> file upload and textbox 2 would have the file to upload.  When the
WebClient
> is done uploading the file, then you can delete the file using the static
> Delete method on the System.IO.File class.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET MVP]



> > Okay, I have been using ASP for several years, and ASP.NET (c#) for the
> last
> > couple of months.  I have very little 'real' programming experience.
> > Here is my scenario.

> > A user, using AutoDesk MapGuide saves a mapguide file to a specific
> location
> > via the web (no problem there).
> > What I need is to create a client-side control that I can pass the
> filename
> > and server address to and have it upload that file to the server without
> the
> > user having to do anything.

> > After the file is uploaded, I want to delete the file.

> > Now, I can do this in a console app using WebClient.UploadFile() and
> typing
> > in the filepath and url.  But I'm having problems with creating a
control
> to
> > accept the two parameters and do the job.

> > Any assistance would be greatly appreciated.



Tue, 26 Oct 2004 09:21:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. WebClient.UploadFile

2. WebClient.UploadFile

3. Trouble with WebClient.UploadFile()

4. Help C newbie need help please

5. Help C newbie need help please

6. HELP -- NEWBIE NEEDS HELP

7. Microsoft's UploadFile method sucks!

8. UploadFile method

9. Newbie - fopen help needed

10. Newbie question: Need help please!

11. NEWBIE in need of help

12. A newbie needs help with file processing

 

 
Powered by phpBB® Forum Software