Monday, July 19, 2010

HastTable for QueryString


//Hash table creation

        Hashtable hs = new Hashtable();

//Add some values to the hash table

        hs.Add((Object)"myname", "jk");
        hs.Add((Object)"No", "109091");
        hs.Add((Object)"Salary", "1348572");

//Get the value of the hash table using the key
        string str = hs["myname"];

//redirect to the next page with the hash table values
        Response.Redirect("page2,aspx?mynames=" + str);

No comments:

Post a Comment