473,513 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NET Framework: Upload File to server

42 New Member
Hi,

I've been searching through internet and all i find is how to upload a file by asp.net, not in an framework.
it is the same thing???

If you got some code or tutorial that could help me, post it please...

thanks in advance.
Feb 1 '08 #1
9 1603
harshmaul
490 Recognized Expert Contributor
Hi Rambaldi,
If your having difficulty uploading useing asp.net (which is what i understand by yours question) you can check out this example...

http://msdn2.microsoft.com/en-us/lib...ileupload.aspx

But in very short you need to use the <asp:FileUpload /> control, and then the SaveAs property of that. but the example explains all of that.
Feb 1 '08 #2
Rambaldi
42 New Member
Hi harshmaul,

Yeah, i want to know to to upload a file in asp.net, but my second question is if the same code would work in a windows form aplication, and if not not, where i can get some information to upload a file in a windows aplication.

Thanks in Advance,

Rambaldi.
Feb 1 '08 #3
Plater
7,872 Recognized Expert Expert
What do you mean by "upload a file"? Do you have a server application that accepts files or something?
Feb 1 '08 #4
Rambaldi
42 New Member
What do you mean by "upload a file"? Do you have a server application that accepts files or something?
No :S

i want to take a file path give by the user in a Open File Dialog and then save that file to a server. Right now i dont have any server aplication to send that file, i was just thinking in making the right process and instead of send it to another server, just redirecting to my own machine like he was the server aplication, bu...t to another folder...

Any help?

Thanks in Advance.
Feb 1 '08 #5
Plater
7,872 Recognized Expert Expert
So are more then one computer going to be involved here?
Because you just described the process of moving a file.
Feb 1 '08 #6
Rambaldi
42 New Member
I found this:

Expand|Select|Wrap|Line Numbers
  1. WebClient client = new WebClient();
  2.                                 client.UploadFile(String address, String filename );
Being 'filename' the path that the file is originally stored and 'address' the path the the file will be stored, i think i can move the file to any place in my computer.

My doubt is:
Can i use this to move to another computer/server???
Feb 1 '08 #7
Plater
7,872 Recognized Expert Expert
That is used to make a webrequest, you will need some kind of webserver application that is listening at that address for it to move there.
Feb 1 '08 #8
Frinavale
9,735 Recognized Expert Moderator Expert
Are you developing a desktop application or web application?
Feb 1 '08 #9
Rambaldi
42 New Member
Are you developing a desktop application or web application?
Actually both, but this ddoubt come from the desktop application i'm working with.

Thank you all for the help []
Feb 2 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11739
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
0
4739
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa persistin upload componentini kullanacam yanlız suanki haliyle...
21
34328
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
2
1379
by: =?Utf-8?B?TmV0YWpp?= | last post by:
Hi Experts We are uploading files on the server using HtmlInputfile control with visual studio 2005, 2.0. In this there is an option for user to keep on uploading the files finally file actually...
0
1298
by: thesti | last post by:
hello, i'm trying to import data from an excel file to a SQL Server 2005 table using the Integration Services Project. i have Visual Studio 2005 installed as i drag the data flow task and...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5086
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.