user724198
user724198

Reputation:

Question about ASP.NET global variables

Might seem like a dumb question, but...

Say I have an ASP solution with a Globals.vb file. Inside that file, I have this:

Public Shared MyVariable As String

Now say I publish this solution and make it available to Bob and Cindy.

If Cindy sets (through the interface) MyVariable to 5, would Bob be able to read it?

I hope not, I'm hoping this variable would be user-specific.

Thanks in advance for letting me know.

Best Regards,

Jason

Upvotes: 0

Views: 1299

Answers (1)

John Boker
John Boker

Reputation: 83699

Yes, bob would be able to read that it was 5 because it's Shared

more information here: What is the use of a shared variable in VB.NET?

Upvotes: 2

Related Questions