Posted on: 12/9/2013 6:15:46 AM | Views : 786

Hi,
I have been using static Dictionary to store the key value pair which will persist the value even after postback. I know using 'static Dictionary' is not a best practice, and using viewstate is another option. How can we save the Dictionary in viewstate, so that i can retireve and update values in different methods and functions in the page.
I have used like this..
static Dictionary<string, int> dictionary = new Dictionary<string, int>();

Thanks,
Amrutha

Go to the complete details ...