Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass variable from class module to class module

Status
Not open for further replies.

EmmeS

Programmer
Jul 25, 2002
5
US
Hello. Does anyone know an eays way to pass variables from a class module to another class module. For instance a logon id, or some other information. Even pass a connection object?

Thanks! ;-)

EmmeS.
 
Oops, I forgot to say... I thought about using "Shared" variables, but this will not work as I am coding in asp.net. "Shared variables" are shared among all sessions and not just an individual user. In other words, if 50 people are logged in, then they get the same values in all 50 sessions. I want each user to have their own values. Enough rambling...thanks for reading this....
 
Hello EmmeS
i am not familiar with the ASP.net but one common way of dealing with the problem that you mentioned is by including a hidden field on the page. Store the information to that (depending on the user) and retrieve it when you need it.

Hope that this helps,
Camel
 
Unless I'm missing something, you should just be able to do it via properties:

class1.connectionString = class2.connectionString

??
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top