what is the use of hashtable? asp.net c#
<p>Hi
What is the use of hashtable? can i use to move record from database in click event of the button using hashtable? if yes then how possible?
Thank You.</p>

<pre><code>//This is the function i used to get next record from database
public void getNextQuestion()
    {
        if (Convert.ToInt32(Session["counter"].ToString()) &lt; 7)
        {
            if (RblOption.SelectedIndex &gt;= 0)
            {
                string str1 = "";
                SqlDataAdapter da3 = new SqlDataAdapter(str1, sqlconn);

                Session["selans"] = RblOption.SelectedIndex.ToString();
                if (Session["Answer"].ToString() == RblOption.SelectedIndex.ToString())
                {
                    int score = Convert.ToInt32(txtScore.Text) + 1;
                    txtScore.Text = score.ToString();
                    lblScore.Text = "Score : " + Convert.ToString(score);
                }

                //Random rnd = new Random();
                //var i = rnd.Next(1, 6);

                SqlDataAdapter da = new SqlDataAdapter("select Q_id from Test_Final where Serial='1' order by Q_id", sqlconn);
                DataSet ds = new DataSet();
                da.Fill(ds, "Test_Final");
                if (ds.Tables[0].Rows.Count &gt; 0)
                {
                    myArray = new int[ds.Tables[0].Rows.Count];
                    bool flag;
                    for (int i = 1; i &lt; ds.Tables[0].Rows.Count; i++)
                    {
                        myArray[i] = Convert.ToInt32(ds.Tables[0].Rows[i]["Q_id"].ToString());
                        //Response.Write(myArray[i]);
                        Random random = new Random();

                        int randomNo = random.Next(0, myArray.Length);

                        flag = true;

                        for (int x = 0; x &lt; myArray.Length; x++)
                        {

                            if (randomNo == myArray[x])
                            {

                                i--;

                                flag = false;

                                break;

                            }

                        }
                        if (flag)

                            myArray[i] = randomNo;

                    }



                    Session["counter"] = Convert.ToString(Convert.ToInt32(Session["counter"].ToString()) + 1);

                    getQuestion(myArray[z]);

                }
                else
                {
                    RegisterStartupScript("myAlert", "&lt;script&gt;alert('Please select the option')&lt;/script&gt;");

                }

            }

            else
            {
                Response.Redirect("Default.aspx");
            }

        }
    }
</code></pre>
