By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,657 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,657 IT Pros & Developers. It's quick & easy.

Populating ddl using hashtables

P: n/a
I have a hash table declared in a class. how do i bind it to a
dropdownlist in a webform?

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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();

--
MY ASP.Net tutorials
http://www.openmymind.net/
<sh************@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I have a hash table declared in a class. how do i bind it to a
dropdownlist in a webform?

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.