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!

2 questions

Status
Not open for further replies.

EmmeS

Programmer
Jul 25, 2002
5
US
I am coverting a classic asp intranet site to asp.net. The site relies heavily on class modules, but they are not very well formed. Here are some questions:

1) There are a few variables that are defined at the top of the .asp page, but used in many many class modules. These variables are not passed in the code, but they are still used. Basically, one of the variables holds messages to the users that each class module builds upon. I realize they technically need to be passed to each function & sub for it to be written correctly, but it wasn't. How can I do this without coding another parameter in every single function & sub in each class module? My original thought was create a new class module and define a variable as:
public shared InfoMsgs as String
This will not work because if something is shared, it's shared among all webpages/users (or instances) of that class module. Is there a way, other than passing a variable to every function that I can use? We definately do not want to use the Session object.

2) Can you place an include module in a code-behind class? I'm asking because at the top of every web page we call a security function to verify the user has access to the page & website. This needs to be moved to the Page_Load event in the code-behind classes because that is executed before the .aspx page.

Thank you for reading my mumbo jumbo... If you have any questions, please let me know. The more advice, the better!

:)

Emme.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top