Hello
I learn now asp.net. I need add in html page, like combobox in windows form. How create in html combobox and how add in page.
When i click on it to display all file names for folders "resurces", which is on localhost. Please help.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dorababu MekaPosted Jul 27, 2011, 6:57 AM
http://www.plus2net.com/javascript_tutorial/list-adding.php
See the working demo if any questions let me know
Dorababu MekaPosted Jul 27, 2011, 9:07 AM
Mike JonsonPosted Jul 27, 2011, 8:42 AM
Mike JonsonPosted Jul 27, 2011, 7:54 AM
And how me add in array or in arraylist my names of files from my folder? Here musst too use javascript and how?
Mike JonsonPosted Jul 27, 2011, 6:51 AM
Dorababu MekaPosted Jul 27, 2011, 5:14 AM
Mike JonsonPosted Jul 27, 2011, 5:06 AM
Dorababu MekaPosted Jul 27, 2011, 4:36 AM
Mike JonsonPosted Jul 27, 2011, 4:35 AM
Dorababu MekaPosted Jul 27, 2011, 4:25 AM
Mike JonsonPosted Jul 27, 2011, 4:18 AM
Dorababu MekaPosted Jul 27, 2011, 4:09 AM
string[] folders = System.IO.Directory.GetDirectories(@"Your Path");
DropDownList1.DataSource = folders;
DropDownList1.DataBind();
Try this as per your requirement
string folders = Server.MapPath("your folder that exists in the application");
string[] folders1 = System.IO.Directory.GetFiles(folders);
DropDownList1.DataSource = folders1;
DropDownList1.DataBind();
Mike JonsonPosted Jul 27, 2011, 4:04 AM
And when the page loads the names of these files should be added to my list(this combobox).
Dorababu MekaPosted Jul 27, 2011, 3:53 AM