Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

where is declare global variable in asp.net and what is use
of global variable

Answer Posted / sridhar

For Classes to be generally consumable across your site you should place them in APP_CODE folder.
This simple class will provide global variable

imports Microsoft.VisualBasic
Public Class Sample
Public Shared Text as String ="Global Variable Example"
End Class

Using it in a page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Me.Title = Sample.Text
End Sub

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can any body provide me the sample web application in asp.net

2023


i want to implement grid view value in paypal site. so how to create this code in asp.net with C#

1985


How would you turn off cookies on one page of your website?

999


Can the unique key be null?

1163


Who is using asp.net?

989


what is publisher?

2155


Should I delete cookies?

1022


How would you get asp.net running in apache web servers?

1093


Can we override the enablepartialrendering property of the scriptmanager class?

1183


Explain how can you debug your .net application?

973


how can create login from create and written conde in asp.net

2484


Elaborate differentiation between ViewState and SessionState?

1135


How Session use Cookies in State Management?

1121


What are the two Layouts supported by a Web form in ASP.NET?

1105


What are html helpers in asp.net?

1138