I'm not a professional programmer and new to c# and hoping to find a little direction.
I
have a multi dimensional data array which I get from third party using
their API and then populate a listbox with the data using
listbox.datasource and databind() which is fine but when a
selectedindexchange event post back to the page the array is now empty
so I need a way to store the data instead of constatly making api
calls. I know that I can create an xml file but dont want to have to
delete and rewrite all entries when the data is refreshed.
Any suggestions would be greatly appreciated!
Thanks,
Greg
Loading
Kirtan PatelPosted Oct 20, 2009, 2:32 PM
you Should use session to Store the Data that you retrieved by API
suppose you getting array int a[5] from API
then Store it in Session like below
and Retrive it like below code
so Now you dont have to call the Api Again you can directly Retrive From Session :)
friend ,if my answer helped you please check "Do you like this answer "
Greg McDanielPosted Oct 20, 2009, 2:43 PM
Greg