C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Binding Combobox with Subdirectory Name and Path of Specific Directory


Posted Date: 26 Aug 2008    Resource Type: Code Snippets    Category: Databinding

Posted By: Ritesh N. Jain       Member Level: Gold
Rating:     Points: 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  
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   BizTalk Adaptors    Web Design

masks masks masks

Contact Us    Privacy Policy    Terms Of Use