To upload a folder in asp.net website application [Resolved]

Posted by Santhi under ASP.NET on 10/11/2012 | Points: 10 | Views : 20338 | Status : [Member] | Replies : 14
Currently, the File Upload control enables a user to select only one file for upload. ...
I need to display all the files inside a folder.

How can we do this in website application ?.

Thanks & Regards,
Santhi .V



Responses

Posted by: Santhi on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
I have done by Using jquery with asp.net.(uplodify plugin)

Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hemanth.Sutapalli on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Santhi,

By using FileUpload Control you can, First You have to convert your folder in format of zipfolder and then upload .

Thanks&&Regards,
S.Hemanth.

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Hemanth,

How this is possible.
I can choose only one file or i have to zip the folder while i am using file upload control.
but i should not zip the folder which contains file.

But we can do this in windows application. but i need it in website application

Thanks & Regards,
Santhi


Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hemanth.Sutapalli on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi santhi,
we can do website also, once check this page you will get clarify Reply With attachment when ever we want to upload a file then it asks zip files only.

Thanks&&Regards,
S.hemanth

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down

I couldn't understand.
My requirement:
I ask the user to select a directory alone that should contains files. Once, they have chosen a directory at runtime.
I have to display all the files in a directory at once.

Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Santhi,

If i'm not wrong, I think you are a bit confused. You can add a folder in your website application. (OR)
If you want to upload more than one file at a time. You can do this by using
1. HTML5
(<input type="file" Multiple="true" />) 
as well as
2. Asp.Net too with (using multiple file upload controls. and HTTPFileCollection).
like:
On click of submit button.
HttpFileCollection files = Request.Files;

for (int i = 0; i < files.Count; i++)
{
HttpPostedFile file = files[i];
string path = Server.MapPath("~/");
string fileName = file.FileName;
file.SaveAs(path + fileName);
Response.Write(fileName + " uploaded successfully !");
}

Here, you are trying to select a "directory" and you are using "file upload" control (context is different).

If this is not appropriate answer. Let me know.

Regards,

Awesome Coding !! :)

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

My requirement:
I should ask the user to point out a directory alone. While pointing out a directory the list of files should be displayed.
I should not use multiple file upload control.

How this can be done in file upload control.

Thanks & Regards,
Santhi

Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
Suggest me a solution.

Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
I have done this by some other way...
Thanks for all your replies..

Thanks & Regards,
Santhi .V

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
Hi santhi,

Could you post your solution and mark as answer, it would be helpful for other.

Regards,

Awesome Coding !! :)

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajukamatham on: 12/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Santhi ,

Can u pls show the code
otherwise pls send me code: raju.thri@agmail.com

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bhupentiwari on: 12/12/2012 [Member] Starter | Points: 25

Up
0
Down
i know that i m not in conversation but u can use following link
http://www.aspsnippets.com/Articles/Implement-Uploadify-jQuery-Plugin-in-ASPNet.aspx

Thanks n Regards
Bhupendra Tiwari

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prasannat on: 2/18/2014 [Member] Starter | Points: 25

Up
0
Down
hi santhi,
i need to upload entire folder,
can u plz tell me how u did dat...
i am searching from past 1 week...
plz help me...
thanks in advance

Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dharmu on: 11/30/2014 [Member] Starter | Points: 25

Up
0
Down
Dear sir ,

I have requirment of to upload folder in C# ,if u have code please send me on my mail id itdharmu@gmail.com

Thanks & Regards
Dharmendra Kumar
9711783693


Santhi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response