S shamila.thakur Oct 17, 2005 #1 I have a hash table declared in a class. how do i bind it to a dropdownlist in a webform?
K Karl Seguin Oct 17, 2005 #2 The same way you bind any other source to a dropdownlist. Use "Key" and "Value" as your dataTest/ValueField ddl.DataSource = urHashtable; ddl.DataTextField = "Value"; ddl.DataValueField = "Key"; ddl.DataBind();
The same way you bind any other source to a dropdownlist. Use "Key" and "Value" as your dataTest/ValueField ddl.DataSource = urHashtable; ddl.DataTextField = "Value"; ddl.DataValueField = "Key"; ddl.DataBind();