Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is there anyway to have a funtion or a variable global to all the asp pages and/or aspx.vb code pages for a single web application?

 

Also is there anyway to share variable between the asp page and its back end vb page?

 

Cheers

 

Peter

Posted

You can use Module, like what we did in VB6, public function in Module can access anyway.

 

Another way is use Cookies or HTTP Session to keep your values. I think it is the better way... of course depend on what value your want to keep.

  • *Gurus*
Posted
No, I wouldn't recommend placing values that aren't constant in web.config. Of course the values can be changed, rather easily, since a web.config file is XML. However, using a shared method of a class that saves the data to a database, session object or cookie would be a much more appropriate method.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...