| |

VerySource

 Forgot password?
 Register
Search
View: 1637|Reply: 15

How does uploading and downloading files in ASP.NET work?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-5 11:30:02
| Show all posts |Read mode
I want to upload files from the client to the server, or download files from the server to the client
How this feature is implemented in ASP.NET
Hope for detailed explanation
Thank you
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-5 14:39:01
| Show all posts
<input type = "file" id = "file1" runat = "server">


Dim filename, filepath As String
        filename = Path.GetFileName (file1.PostedFile.FileName)
        filepath = Server.MapPath ("upload\news\")&filename
        uploadfile.PostedFile.SaveAs (filepath)
        Label1.Text = "Upload successful!"
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-5 14:45:01
| Show all posts
Download the link to the file and you're good to go.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-5 16:51:01
| Show all posts
Isn't it OK to use the fileupload control?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-30 16:15:01
| Show all posts
I’m a novice, I feel thatshenmue024is more comprehensive, but I still don’t understand
Reply

Use magic Report

0

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-7-30 18:00:01
| Show all posts
Upload: Just use the code above.
Download: Allow users to access the link to the resource.
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-30 20:45:01
| Show all posts
Upload: Just write the CODE above in the upload BUTTON..
Download: Just give a link path (path to download the file)
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-7-30 22:15:01
| Show all posts
HTML control INPUT (FILE) in VS.net2005 and convert it to server control, you can upload! Download it? A hyperlink is fine
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 United States

Post time: 2020-7-31 02:15:01
| Show all posts
Thank you all
I was also taught
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-31 09:30:01
| Show all posts
Upload control

Connection
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list