Error while using "State Bags".
From: Hrishi R (HrishiR_at_discussions.microsoft.com)
Date: 11/16/04
- Next message: Saravana: "Re: caching problem"
- Previous message: Saravana: "Re: Wait message..."
- Next in thread: Ethem Azun: "RE: Error while using "State Bags"."
- Reply: Ethem Azun: "RE: Error while using "State Bags"."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Nov 2004 22:19:02 -0800
Hi:
The following ASP.NET code segment throws an "Object reference not set to an
instance of an object" exception.
------------------
Public Sub Page_Load(Source As Object, E As EventArgs)
Dim viewCount As Integer
If ViewState("viewCount").ToString() = "" Then
viewCount = 1
Else
viewCount = CType(ViewState("viewCount"), Integer) + 1
End If
labelViews.Text = "Times page has been viewed: " & viewCount.ToString()
ViewState("viewCount") = viewCount
-------------
Please help, i can find many references to this exception on MSDN but none
seems to help.
Thanks.
- Next message: Saravana: "Re: caching problem"
- Previous message: Saravana: "Re: Wait message..."
- Next in thread: Ethem Azun: "RE: Error while using "State Bags"."
- Reply: Ethem Azun: "RE: Error while using "State Bags"."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|