need help to create new folder in drop down list

Posted by Masif05 under ASP.NET on 4/18/2009 | Views : 1563 | Status : [Member] | Replies : 7
i want to know how to create a new folder in drop down list..

exaple: as we know in yahoo or gmail..where we have option to create person new folder...when we click on that option it will ask to enter the folder name....and after the same folder is added in the drop down list..and the same folder also disply in left panel of the page..



regards
mohammad Asif




Responses

Posted by: Vuyiswamb on: 4/19/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning mohammad

I Understand what you are asking , but i have two things in mind, but i thought let me ask something before you i asnwer your Question. You want to Create a folder on your web interface and and at the windows level. Meaning that , if you create a Folder in your Web Application, do you want it to create a Folder on your Local machine ?


Thank you

Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Masif05 on: 4/20/2009 [Member] Starter

Up
0
Down
Good Evening Vuyiswamb,

Thank you at first to reply me.Yes, you are right i want create a folder in web interface and the folder create on my Local Machine..so dear friend kindly forward me its code as early as possible so i can solve my problem..its very important for me do. early..

Thank you.

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

Posted by: Vuyiswamb on: 4/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Afternoon

Lets say for example your page is called makeFolder.aspx and lives on your server here: c:\wwwroot\Inetpub\websites\mywebsite.com\makeFolder.aspx


on the internet, that'd probably look like:
http://www.mywebsite.com/makeFolder.aspx


To create a folder at this location, use the following inside your makeFolder.aspx file:

thisDir = Server.MapPath(".");

System.IO.Directory.CreateDirectory(thisDir + "\\NewFolder1");

(or you can use the @ symbol to prefix instead of double slashes).

So now your actual directory stucture will look like this:
c:\wwwroot\Inetpub\websites\mywebsite.com\NewFolder1

or, via the net:
http://www.mywebsite.com/NewFolder1


Thank you for Posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Masif05 on: 4/20/2009 [Member] Starter

Up
0
Down
Good Evening,

Thanks for your good understanding.i get your code.but i need to create a folder by user enter.. and that should be display inside the drop down as well.and also display left panel..so i think i need more information to complete this

thank you

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

Posted by: Vuyiswamb on: 4/20/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning mohammad

This is Simple thing to do in Asp.net. Mybe if i can just share the logic you will understand. A user can Click on a Menu item that says Create Folder , after clicking there, he will be given an option to enter the name of the Folder,you can do that by accepting an input with the textbox control and before you save check if the folder name exists if it does give a proper message, if it does not , Create a new Folder as i shown you. and take the name of the folder and add it to your listbox or dropdownlist

dropdown.item.add("new Folder") ;


you can use the Variable instead that hold the name of the Folder

Thank you for posting at Dotnetfunda

Vuyiswa Maseko



Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Masif05 on: 4/21/2009 [Member] Starter

Up
0
Down
thank you so much dotnetdunda team..

i m new here..but i dont feel after your great response to me..i wish i can help other people too who need my help..

thank you

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

Posted by: Vuyiswamb on: 4/22/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Morning Masif05

It is Greatly Appreaciated, you are welcome.

Thank you for using Dotnefunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

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

Login to post response