DropDownList

 
DropDownList
 dd 
=
 
new
 
DropDownList
();

Hashtable mycountries = New Hashtable ();
mycountries
. Add ( "N" , "Norway" );
mycountries
. Add ( "S" , "Sweden" );
mycountries
. Add ( "F" , "France" );
mycountries
. Add ( "I" , "Italy" );
dd
. DataSource = mycountries ;
dd
. DataValueField = "Key" ;
dd
. DataTextField = "Value" ;
dd
. DataBind ();

你可能感兴趣的:(F#)