1
Answer

Using the WebMethod property EnableSession to save data

Ask a question
sean

sean

14y
8.1k
1
Here is a small, simplified sample of my code: [System.Web.Services.WebMethod(EnableSession=true)] public void StartGame() { numTurns = 8; } [System.Web.Services.WebMethod(EnableSession=true)] public int getTurns() { return numTurns; } When I debug this web service (VS 2008) I invoke StartGame first, then I close out of that tab and invoke getTurns. It should print out 8, but it prints out 0. What could the problem be?

Answers (1)