C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Databinding »

Binding Combobox with Subdirectory Name and Path of Specific Directory


Posted Date: 26 Aug 2008    Resource Type: Code Snippets    Category: Databinding
Author: Ritesh N. JainMember Level: Gold    
Rating: 1 out of 5Points: 10



Below VB.NET code will fill the Combobox with the Sub-Directory name of the given Directory.


ComboBox1.DisplayMember = "Name"
ComboBox1.ValueMember = "FullName"
ComboBox1.DataSource = New DirectoryInfo("C:\Samples").GetDirectories("*")

'In case one is using .NET 2.0 + than he can use overloaded method of
' GetDirectories(searchPattern, SearchOption) to include/Exclude Sub directory as per onces need.


In above code once can accessed the Name of selected Directory using ComboBox1.Text Property and Full Path can be accessed using ComboBox1.selectedvalue Property.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Combobox fill Subdirectory Name  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Gridview upload
Previous Resource: simple code to binding data with data control for beginners
Return to Discussion Resource Index
Post New Resource
Category: Databinding


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use