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

Answers were Sorted based on User's Feedback



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

Answer / sridhar

ou can use web.config to store global varriables

<appSettings>
<!-- Generic Settings -->
<add key="PDFBaseDir" value="\\server\pdfs\"/>
</appSettings>

PDFBaseDir Can be used across application

Is This Answer Correct ?    5 Yes 1 No

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

Answer / 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

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

Answer / kinjal panchal

we can declare global variable in class file. and this
global variable we can use in whole application.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Can you explain what inheritance is and an example of when you might use it?

1 Answers   Sports Interactive,


SessionState - type of sessionstate and when and how to use it

1 Answers   Syntel,


what are the new server controls added in Asp.net 2.0?

1 Answers   DOSPL,


What is session management in web application?

0 Answers  


What is postback pixel?

0 Answers  


Explain page output caching?

0 Answers  


How to register exception filter globally?

0 Answers  


Explain the difference between server control and html control.

0 Answers  


What is application state?

0 Answers  


Give a few examples of page life cycle events.

0 Answers   Accenture,


About Postback ?

6 Answers   Accenture,


What does asax stand for?

0 Answers  


Categories