I need help with global variables

  • Thread starter Thread starter Lian
  • Start date Start date
L

Lian

Hello Everybody

I am writing a web application using c#. I have several pages. I want
to create an Arraylist in one page fill it up and try to modify it in
another page. How do I do it?

Please help me

Lian
 
You could use the HttpSessionState of the Page object.
ArrayList al
.....
base.Session ["MyKey"] = al;

This will be reached from any member page of the session.
 
yes I will try to be more specific. I created 2 web pages. in one i am
intiolaizing an Arraylist and I want the people will see it in another.
In addition I want that all the people that are logon could also change
data in the list array. Session could not help me cause it is just for
one user
 
Then use a static instance of ArrayList, preferably declared
in Global.asax.cs.

public static System.Collections.ArrayList al = ...;

You can then reach it using
Global.al
 
Back
Top