Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

How do you use values from web forms accross multiple pages

Hi,

I have a web form and I want to be able to use the values from the controls accross multiple web pages.

For example when users log into a site, how can I show details from the user even when selecting different pages.

If someone could even tell me where I should be reading to get this information I would be very thankful

Cheers
0
pgilfeather
Asked:
pgilfeather
  • 3
  • 2
  • 2
  • +1
4 Solutions
 
YZlatCommented:
Declare your controls as Public.

0
 
Jase-CoderCommented:
0
 
SirKCommented:
Just include a module, and inside that module, declare the variables that you wish to store your data inside as global.

Inside Module1:

Global myVarName as Integer, myStringName as String

etc...

Then when you access them later, they will still be there with the same values.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bigjim2000Commented:
I'd make a struct with all the values in it.  Then just store this struct as an object in the servers session state.  Each time you load a page, grab this struct from the session, populate it with some values (the ones you need for that particular page) and you are set.  TO make this even faster, store the object in the cache.

Also, when the user changes a value that you want to remember, just grab the object again, make the change, and put it back in the session/cache.

-Eric
0
 
Jase-CoderCommented:
I thought that my solution, rather links were, helpful enough to be classed as an answer to the problem.
0
 
YZlatCommented:
declaring controls and variables as Public allows to access them from different pages
0
 
SirKCommented:
I think that all of our suggestions are useful, so I suggest that we divide the points up among everyone who added advice.

-K
0
 
Jase-CoderCommented:
I'll agree to that.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now