Re: 2 dimension arrays
- From: Andrew <Andrew@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 04:22:01 -0700
Thanks for your reply.
How do I declare an array as a session variable ?
I tried:
int [] marked = new int [50];
Session["marked[0] "] = 2;
I got a syntax error.
"Hans Kesting" wrote:
> Andrew wrote:
> > Hi,
> >
> > I have an array of 50 rows and 2 columns that I want to make
> > available to a user. As he goes thru the system, he will be updating
> > and editing the array. This is unique to each user in the session.
> >
> > eg. public string[,] marked = new String[50][2].
> >
> > How do you suggest I do it ? Do I declare it as global variable, or
> > is it possible to put it as a session variable?
> >
> > TIA. Cheers.
> > Andrew.
>
> You will *need* to put in in Session: a "global variable" (static member of some class)
> is the same for *all* users of your site (the single webapp serves multiple users).
> If you want to retain user-specific data in server-memory, you have to
> user Session. (other options: client side using ViewState or hidden inputs
> or in a database under a user-specific key)
>
>
> Hans Kesting
>
>
>
.
- Follow-Ups:
- Re: 2 dimension arrays
- From: Juan T. Llibre
- Re: 2 dimension arrays
- From: Hans Kesting
- Re: 2 dimension arrays
- References:
- 2 dimension arrays
- From: Andrew
- Re: 2 dimension arrays
- From: Hans Kesting
- 2 dimension arrays
- Prev by Date: Re: How to "undo" a database delete
- Next by Date: RE: How to "undo" a database delete
- Previous by thread: Re: 2 dimension arrays
- Next by thread: Re: 2 dimension arrays
- Index(es):
Relevant Pages
|