Reputation: 494
I would like to prepare session which will be using tables and in another websites will be add new items to session.
Default.cs
string[] tab = new string[100];
tab[0] = "songo";
tab[1] = "tom";
Session["login"] = tab;
Response.Redirect("panel_admina.aspx");
panel_admina.cs and here I have got problem because in next website I would like add something to my existing session for examle:
Session["login"].[2] ="adam" ?
and later read only existing data which is in table not all table [100].
What should I do to do it?
Upvotes: 1
Views: 149
Reputation:
Pull the value from the session into another array on your panel_admina.cs? If this array is then modified on the panel_admina.cs and you might need to refer to this back on the default.cs then just save it back to the session again? I'm willing to bet that it's probably more efficient to refer to a local array variable than a session one anyway (a very small difference I know).
Upvotes: 0