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

how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool

0 Answers   Satyam,


what are the oops concepts are used in your project?

1 Answers   AppShark, IBM, Kotak,


what is silver light when will we use silver light,

0 Answers  


is it possible to use web site without web server from remote place?

1 Answers   ABC, Mannar Company, Quadrant,


What asp.net control can embed xaml into asp.net pages?

0 Answers  


I am having four text boxes in my web application. I am setting Required Field validator to each Text box. And I am having two buttons in my application. If i clicked the first button only first two text box validation will get fire. Dont show error message for remaining two text box. If i clicked second button last two text box validation will get fired. It will not consider the first two validation controls. That is how to enable and disable the validation controls.

4 Answers  


What is a bubbled event?

2 Answers  


What is JIT and how is works ?

1 Answers   Patni,


Best Institute in india for online training (Dotnet/java/Tibco/Dwh/etc.....)

4 Answers  


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

0 Answers  


What happens if an ASP.NET server control with event-handling routines is missing from its definition?

0 Answers   MindCracker,


Could u send me the answer for this question as soon as possible. Im using 'System.net.mail.mailmessage' namespace for sending a mail from my application. What should I mention in 'system.net.mail.mailmessage.to' property and What should I mention in 'system.net.mail.mailmessage.from' property.

1 Answers  


Categories