peterdoherty Posted February 26, 2003 Posted February 26, 2003 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 Quote
bungpeng Posted February 26, 2003 Posted February 26, 2003 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. Quote
peterdoherty Posted February 27, 2003 Author Posted February 27, 2003 How can i access these from scirp in the .aspx file though? is it possible?? Quote
*Gurus* Derek Stone Posted February 27, 2003 *Gurus* Posted February 27, 2003 There's no need for a module. You can store the values in a shared class which is imported to each page, or in the application's web.config file. Both methods have their advantages. Quote Posting Guidelines
bungpeng Posted February 28, 2003 Posted February 28, 2003 Store in web.config? Is it for constant only? How about variable (can change the value)? How to do it? Quote
*Gurus* Derek Stone Posted February 28, 2003 *Gurus* Posted February 28, 2003 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. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.