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 Beginner's Guide to Joomla
Easing the Migration to Microsoft SQL Server 2005
Programmers Heaven C# School Book - Free 338 Page eBook