The following vb.net code demonstrates how to use a SortedList
This code creates a SortedList named mystate and adds elements to it.Items are added to the SortedList with the Add() method. A SortedList can be sized to its final size with the TrimToSize() method
dim mystates=New SortedList mystates.Add("K","Kerala") mystates.Add("T","TamilNadu") mystates.Add("A","Assam") mystates.Add("M","Maharastra")
The following code shows how to use the SortedList
dim mystates=New SortedList mystates.Add("K","Kerala") mystates.Add("T","TamilNadu") mystates.Add("A","Assam") mystates.Add("M","Maharastra")
rbList.DataSource=mystates rbList.DataValueField="Key" rbList.DataTextField="Value" rbList.DataBind()
|
No responses found. Be the first to respond and make money from revenue sharing program.
|