Click here to Skip to main content
15,887,952 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 6:14
Member 87616673-Jun-14 6:14 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 6:36
mveRichard Deeming3-Jun-14 6:36 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 6:58
Member 87616673-Jun-14 6:58 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 7:20
mveRichard Deeming3-Jun-14 7:20 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 7:32
Member 87616673-Jun-14 7:32 
GeneralRe: Beginner to Visual Studio Pin
Richard Deeming3-Jun-14 7:49
mveRichard Deeming3-Jun-14 7:49 
GeneralRe: Beginner to Visual Studio Pin
Member 87616673-Jun-14 8:12
Member 87616673-Jun-14 8:12 
QuestionHttpApplicationState Pin
jkirkerx2-Jun-14 13:17
professionaljkirkerx2-Jun-14 13:17 
I'm playing around with counting how many users are online.

So I added this to the Global.asax file
Sub Session_Start()

       guestCount = Convert.ToInt32(Application("guestCount"))
       Application("guestCount") = guestCount + 1

 End Sub

 Sub Session_End()

       Application("guestCount") = guestCount - 1
       Session.Clear()

 End Sub


I'm trying to access Application data in a server control, but I can't figure out how to check the existence or access the value.

This is what I have, but I'm not even close to getting it right. I thought I could access the data using something like a session value, but not the case.

Dim m As HttpApplicationState = HttpApplicationState

If Not (Application("guestCount") Is Nothing) Then
lbl_OnlineUser_Count_Field.Text = Application("guestCount")
End If

Answer[SOLVED] Pin
jkirkerx2-Jun-14 13:26
professionaljkirkerx2-Jun-14 13:26 
SuggestionRe: [SOLVED] Pin
thatraja3-Jun-14 21:13
professionalthatraja3-Jun-14 21:13 
GeneralRe: [SOLVED] Pin
jkirkerx4-Jun-14 5:52
professionaljkirkerx4-Jun-14 5:52 
QuestionMicrosoftAjax.js broken in Windows 8.1? Pin
Richard Deeming2-Jun-14 8:49
mveRichard Deeming2-Jun-14 8:49 
QuestionDirect Print Pin
Dana_Wahab1-Jun-14 23:58
Dana_Wahab1-Jun-14 23:58 
AnswerRe: Direct Print Pin
Kornfeld Eliyahu Peter2-Jun-14 0:42
professionalKornfeld Eliyahu Peter2-Jun-14 0:42 
QuestionI have problem with my nested control in datalist Pin
marjan_198630-May-14 22:09
marjan_198630-May-14 22:09 
AnswerRe: I have problem with my nested control in datalist Pin
DamithSL31-May-14 4:32
professionalDamithSL31-May-14 4:32 
QuestionBackUp... Pin
Kamran Ilyas30-May-14 21:46
Kamran Ilyas30-May-14 21:46 
AnswerRe: BackUp... Pin
Richard MacCutchan30-May-14 22:15
mveRichard MacCutchan30-May-14 22:15 
AnswerRe: BackUp... Pin
ZurdoDev2-Jun-14 9:47
professionalZurdoDev2-Jun-14 9:47 
Questionbus status active after mentioned Departure time Pin
rinku baruah30-May-14 18:55
rinku baruah30-May-14 18:55 
QuestionRe: bus status active after mentioned Departure time Pin
Richard MacCutchan30-May-14 22:12
mveRichard MacCutchan30-May-14 22:12 
AnswerRe: bus status active after mentioned Departure time Pin
rinku baruah1-Jun-14 18:57
rinku baruah1-Jun-14 18:57 
GeneralRe: bus status active after mentioned Departure time Pin
Mycroft Holmes1-Jun-14 19:37
professionalMycroft Holmes1-Jun-14 19:37 
QuestionHow to create metadata compatible with the Microsoft.AspNet.Scaffolding.core.Metadata.MetadataModel class Pin
John Papachristos23-May-14 14:29
John Papachristos23-May-14 14:29 
Questionrow increase by 1 Pin
byka22-May-14 8:12
byka22-May-14 8:12 

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.