Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • 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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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