AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 to declare global variable as.net vb
Posted by darif naima on  3/28/2011 8:26:06 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
how can I declare a global variable in order to be known in all the pages.aspx in asp.net with visual
studio 2008.
i make this syntax (public myvariable as string ) but myvariable is known just in the current page Thanks.

Post Your Reply Post New Question

 Viewer's Reply
Declare Global Variable in Asp.Net
Answered By Moderator1 on 4/5/2011 9:38:59 AM
Hi,

You can achieve this by using Application Variable like below,
Application("SampleVariable") = Your_Value
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Simply JavaScript - Free 150 Page Preview!
Introduction to Web Applications Development