ADD/Read Hashtable Values using Asp.net (VB)

Ex:

[sourcecode language=’vb’]

‘ Add values to Hashtable

Dim aHash As New Hashtable

aHash.Add(“id”, Trim(txtID.Text))
aHash.Add(“name”, Trim(txtName.Text))

‘ Read Values from Hashtable

Dim en As IDictionaryEnumerator
en = aHash.GetEnumerator

While en.MoveNext
Response.write (“Key : ” & en.Key & ” / Value : ” & en.Value)
End While

[/sourcecode]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: