Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Controls and Properties
Message
 
To
01/11/2002 16:59:34
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00717518
Message ID:
00718314
Views:
26
Hi Jim,

The default use of Session State needs cookies enabled on the browser. If you don't have that enabled, then you will need to use the cookieless setting in the config file. If sounds like your session state is not being saved between pages. I would debug the code to confirm this.

>Cathi,
>
> Thanks for the suggestion. I almost have it. Here is what I tried. 1. I placed the code below in the load event and it doesn't work. The "Specified cast is Invalid exception" is thrown. 2. I also placed the same code in a method and call the method from the load event of the form, I get the same exception. 3. If I place the code in a click event of a button, the code works when the button is clicked. Why am I getting the Specified cast is not valid message?
>
>
> Try
>    dsResults = CType(Session("dsSearchResults"), DataSet)
>    setMessage("There were " + dsResults.Tables(0).Rows.Count.ToString + " record(s) found!")
> Catch exp As Exception
>     setMessage(exp.Message)
> End Try
>
>
>
>Thanks
>
>Jim
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform