I am trying to create directories in a particular folder.It is like this "It is like this, A textbox and a button will be present in the page. Once I click the button A folder should be created with the name present in the textbox" Can anyone let me know
"How do I achieve this"?
Thanks and Regards
Sandeep.
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread
This is the situation. I have so many folders in my project. I need to upload files to different folders. How would I get an option to select a particular folder to save the file at run time?
Sandeep
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread
Hey thank you very much for your quick reply. That has helped me a lot. Could you please let me know "How to exclude particular folders from the radio button list"?
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread
babji.sunny@...
Participant
1218 Points
360 Posts
How to create a folder on button click?
Dec 31, 2008 06:45 AM|LINK
Hi All,
I am trying to create directories in a particular folder.It is like this "It is like this, A textbox and a button will be present in the page. Once I click the button A folder should be created with the name present in the textbox" Can anyone let me know "How do I achieve this"?
Thanks and Regards
Sandeep.
This can be beneficial to other community members reading the thread
kipo
All-Star
16475 Points
2811 Posts
Re: How to create a folder on button click?
Dec 31, 2008 07:01 AM|LINK
Try with this:
sandeepbhuta...
Participant
1419 Points
375 Posts
Re: How to create a folder on button click?
Dec 31, 2008 07:02 AM|LINK
Use Directory.Create method
Sandeep Bhutani
sandeepbhuta...
Participant
1419 Points
375 Posts
Re: How to create a folder on button click?
Dec 31, 2008 07:03 AM|LINK
Here is the code:
System.IO.
Directory.CreateDirectory(TextBox1.Text);Sandeep Bhutani
sirdneo
All-Star
15171 Points
2509 Posts
Re: How to create a folder on button click?
Dec 31, 2008 07:42 AM|LINK
Try this code:-
System.IO.Directory.CreateDirectory(MapPath("~/" + TextBox1.Text));
Zeeshan Umar
~Please Mark As Answer, one or multiple posts, which helped you. So that it might be useful for others~
kipo
All-Star
16475 Points
2811 Posts
Re: How to create a folder on button click?
Dec 31, 2008 07:52 AM|LINK
babji.sunny@...
Participant
1218 Points
360 Posts
Re: How to create a folder on button click?
Dec 31, 2008 08:02 AM|LINK
Thank you, it resolved the issue.
Hey, can you help me on more issue?
This is the situation. I have so many folders in my project. I need to upload files to different folders. How would I get an option to select a particular folder to save the file at run time?
Sandeep
This can be beneficial to other community members reading the thread
kipo
All-Star
16475 Points
2811 Posts
Re: How to create a folder on button click?
Dec 31, 2008 08:10 AM|LINK
You can use RadioButtonList which you can Bind with list of your Directories:
Code (Page_Load event) - instead of "*", you can use some search pattern: Use this for Directory name when saving file:Control:
babji.sunny@...
Participant
1218 Points
360 Posts
Re: How to create a folder on button click?
Dec 31, 2008 10:17 AM|LINK
Hey thank you very much for your quick reply. That has helped me a lot. Could you please let me know "How to exclude particular folders from the radio button list"?
This can be beneficial to other community members reading the thread
babji.sunny@...
Participant
1218 Points
360 Posts
Re: How to create a folder on button click?
Jan 02, 2009 05:07 AM|LINK
Hi,
Could you please let me know "How would I disable radio button list item for a particular folder"
This can be beneficial to other community members reading the thread