Click here to Skip to main content
15,895,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: Please can someone do me a favour and run a C# test for me Pin
Dave Midgley13-Feb-11 6:06
Dave Midgley13-Feb-11 6:06 
GeneralRe: Please can someone do me a favour and run a C# test for me Pin
OriginalGriff13-Feb-11 6:09
mveOriginalGriff13-Feb-11 6:09 
GeneralRe: Please can someone do me a favour and run a C# test for me Pin
Richard MacCutchan13-Feb-11 6:24
mveRichard MacCutchan13-Feb-11 6:24 
GeneralRe: Please can someone do me a favour and run a C# test for me Pin
PIEBALDconsult13-Feb-11 14:58
mvePIEBALDconsult13-Feb-11 14:58 
AnswerRe: Please can someone do me a favour and run a C# test for me Pin
Dave Kreskowiak13-Feb-11 10:59
mveDave Kreskowiak13-Feb-11 10:59 
GeneralRe: Please can someone do me a favour and run a C# test for me Pin
Dave Midgley13-Feb-11 20:19
Dave Midgley13-Feb-11 20:19 
QuestionVariable to be Accessed throughout code [modified] Pin
MWRivera12-Feb-11 16:37
MWRivera12-Feb-11 16:37 
AnswerRe: Variable to be Accessed throughout code Pin
OriginalGriff12-Feb-11 21:21
mveOriginalGriff12-Feb-11 21:21 
Put it in the web.config file or in a session variable.

Static variables are for the life of the class, not globally applied - they will be removed when the instance of the application terminates.

When does the app terminate? For ASP.NET, it terminates when the page load is finished.

I.e. The page request arrives at the server. The app is started, returns the page and is terminated. Any postback, or new page request starts a new instance of the app.

Putting it in a static variable won't work: the static variable would have to be set up anew every time the page is loaded!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

GeneralRe: Variable to be Accessed throughout code Pin
MWRivera13-Feb-11 4:07
MWRivera13-Feb-11 4:07 
GeneralRe: Variable to be Accessed throughout code Pin
OriginalGriff13-Feb-11 5:42
mveOriginalGriff13-Feb-11 5:42 
GeneralRe: Variable to be Accessed throughout code Pin
MWRivera14-Feb-11 15:31
MWRivera14-Feb-11 15:31 
AnswerRe: Variable to be Accessed throughout code Pin
RichardGrimmer15-Feb-11 3:55
RichardGrimmer15-Feb-11 3:55 
GeneralRe: Variable to be Accessed throughout code Pin
MWRivera15-Feb-11 4:03
MWRivera15-Feb-11 4:03 
QuestionSimple calculator Pin
nstk12-Feb-11 7:28
nstk12-Feb-11 7:28 
AnswerRe: Simple calculator PinPopular
Luc Pattyn12-Feb-11 7:37
sitebuilderLuc Pattyn12-Feb-11 7:37 
GeneralRe: Simple calculator Pin
nstk12-Feb-11 11:07
nstk12-Feb-11 11:07 
AnswerRe: Simple calculator Pin
Manfred Rudolf Bihy12-Feb-11 11:19
professionalManfred Rudolf Bihy12-Feb-11 11:19 
AnswerRe: Simple calculator Pin
Luc Pattyn12-Feb-11 11:21
sitebuilderLuc Pattyn12-Feb-11 11:21 
GeneralRe: Simple calculator Pin
nstk13-Feb-11 23:57
nstk13-Feb-11 23:57 
GeneralRe: Simple calculator [modified] Pin
nstk14-Feb-11 3:52
nstk14-Feb-11 3:52 
AnswerRe: Simple calculator Pin
DaveyM6912-Feb-11 12:22
professionalDaveyM6912-Feb-11 12:22 
AnswerRe: Simple calculator Pin
Luc Pattyn12-Feb-11 18:04
sitebuilderLuc Pattyn12-Feb-11 18:04 
GeneralRe: Simple calculator Pin
DaveyM6913-Feb-11 2:48
professionalDaveyM6913-Feb-11 2:48 
AnswerRe: Simple calculator Pin
Luc Pattyn13-Feb-11 3:01
sitebuilderLuc Pattyn13-Feb-11 3:01 
GeneralRe: Simple calculator [modified] Pin
nstk14-Feb-11 10:21
nstk14-Feb-11 10:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.