Click here to Skip to main content
15,915,611 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to save my data in database using hash table in asp.net.
how to it possible?
thanks in advance
Posted

1 solution

hi,

Please look into the code for getting the data from the hash table :

C#
using System;
using System.Collections;

class Program
{
    static void Main()
    {
    Hashtable hashtable = new Hashtable();
    hashtable[1] = "One";
    hashtable[2] = "Two";
    hashtable[13] = "Thirteen";

    foreach (DictionaryEntry entry in hashtable)
    {
        Console.WriteLine("{0}, {1}", entry.Key, entry.Value);
    }
    }
}



In the for loop, put you database insert query.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900