How can i use HashTables.... using sql sever as backend...to dispaly data in a table?
Thanx!!! :bigyello:
Printable View
How can i use HashTables.... using sql sever as backend...to dispaly data in a table?
Thanx!!! :bigyello:
I would suggest just bind a repeater or datalist or something to a dataset :)
what's a hash table?
ultimate_girl:
A hash table is a data structure that holds key-value pairs. In other words I could add an item to a hash table like so:
and then access the value by referencing the key:Code:MyHashTable.Add("Key", "Value);
joshi_nitin:Code:MyValue = MyHashTable("Key");
You can't use HashTables to display data they are purely a data structure.
You could populate a HashTable from your database and then databind it to a datalist or repeater as plenderj suggested.
Generally speaking though a DataTable is used as the data structure as it has methods in place to populate it automatically from a database query rather than having to write all the code to do this manually into a Hash Table.
Let me know if you need to know more.
DJ