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 »

Bind using collections


Posted Date: 19 Nov 2008    Resource Type: Code Snippets    Category: Databinding
Author: Vinod ChattergeeMember Level: Silver    
Rating: 1 out of 5Points: 10



1.You need to declare a collection

dim i as Integer=0
dim container as new collection
while i=10
container.add("Item"+i,i) 'Here second parameter(Key) cannot be a duplicate one
i=1+1
end while

2.Drag and drop one dropdownlist to your page and set the data source as below

dropdownlist1.datasource=container 'Assuming 'dropdownlist1' is your dropdown list
dropdownlist1.databind()

3.Change the code as per your needs.It will be useful if you need to make your data source as a business object.



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.
Data Binding  .  Collection  .  

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: How to Navigate Records using VB.NET
Previous Resource: bindinding datagridview in windows application
Return to Discussion Resource Index
Post New Resource
Category: Databinding


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use