Hi all
I encounter a problem but don't know how to solve it.
Here is my situtation:
I have a web page, 2 user controls: A and B. A and B are dynamically loaded
into the main page. In B there are 4 buttons, TextBox, object and
classes,...There is one object I want to save all of its values and I
decided to use
Session["utility"] = myobject. For the first 3 button, I always remember to
assign that object back to the Session for the next use, and it works fine
for the first 3 buttons. The last button is a "Save All" button and I also
want to retrive that object by: myojbect =
(myclasstypehere)Session["utility"]. It breaks my code. Running debug I
receive this: myobjec is null and there is a message like this:"
Session["utility"] function 'Session.get_Item' evaluated and returned null
".
I don't know why it gave me that error. I works with 3 other buttons but not
with this.
Thanks for any help 2 1249
Apparently, when you are assigning myObject to Session["utility"], it is not
initialized, and is null. Either that, or the Session data is being lost
somehow (not likely).
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:#W**************@TK2MSFTNGP09.phx.gbl... Hi all
I encounter a problem but don't know how to solve it.
Here is my situtation:
I have a web page, 2 user controls: A and B. A and B are dynamically
loaded into the main page. In B there are 4 buttons, TextBox, object and classes,...There is one object I want to save all of its values and I decided to use Session["utility"] = myobject. For the first 3 button, I always remember
to assign that object back to the Session for the next use, and it works fine for the first 3 buttons. The last button is a "Save All" button and I also want to retrive that object by: myojbect = (myclasstypehere)Session["utility"]. It breaks my code. Running debug I receive this: myobjec is null and there is a message like this:" Session["utility"] function 'Session.get_Item' evaluated and returned null ".
I don't know why it gave me that error. I works with 3 other buttons but
not with this.
Thanks for any help
When I debugged, that object apprantely had a value. I don't know why after
postback it seemed the Session was swept out
Appreciate any suggestions
Thanks
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:uV**************@TK2MSFTNGP12.phx.gbl... Apparently, when you are assigning myObject to Session["utility"], it is
not initialized, and is null. Either that, or the Session data is being lost somehow (not likely).
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things.
"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message news:#W**************@TK2MSFTNGP09.phx.gbl... Hi all
I encounter a problem but don't know how to solve it.
Here is my situtation:
I have a web page, 2 user controls: A and B. A and B are dynamically loaded into the main page. In B there are 4 buttons, TextBox, object and classes,...There is one object I want to save all of its values and I decided to use Session["utility"] = myobject. For the first 3 button, I always remember to assign that object back to the Session for the next use, and it works
fine for the first 3 buttons. The last button is a "Save All" button and I
also want to retrive that object by: myojbect = (myclasstypehere)Session["utility"]. It breaks my code. Running debug I receive this: myobjec is null and there is a message like this:" Session["utility"] function 'Session.get_Item' evaluated and returned
null ".
I don't know why it gave me that error. I works with 3 other buttons but not with this.
Thanks for any help
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: redneck_kiwi |
last post by:
Hi all:
I have a really weird problem. I am developing a customer catalog
system for my company and as such have delved into sessions for
authentication and access levels. So far, I have managed...
|
by: C. Woody Butler |
last post by:
I have a strange problem with a website and a web service.
They're both on the same server, running Windows server 2003. The website is
set up as the default website for the server.
I've got...
|
by: bas jaburg |
last post by:
Hi,
I am using the Microsoft Application BuildingBolock (Freudian slip,
hahaha) Exception Management and am using a CustomPublisher. This goes
fine and it write's stuff the Windows EventLog.
...
|
by: Bill Rapoza |
last post by:
We have a method that executes an arbitrary batch file (we use it for remote
upgrades of our system).
When we execute this method from outside of ASP.NET (either in the
foreground app or from a...
|
by: Bill Nguyen |
last post by:
Every time I jumped to a new month, the app kept popping up the message box
for subsequent months until 2050! If I stayed within the same month (current
month), it worked fine.
Please take a look...
| |
by: Nak |
last post by:
Hi there,
It's probably me being weird more than the function but I'm having
problems with it doing as it should.
I have a C++ application with 2 resources of custom types,
RT_INIFILE @...
|
by: Joe Van Meer |
last post by:
Hi All,
I have begun a small app (exe) that contains a listbox. When I go to
manipulate it in code, say a loop through all the listitems in the listbox
it says that my ListItem is not declared...
|
by: Mark Denardo |
last post by:
I recently upgraded to VS2005 and converted some projects from 1.1 to 2.0
and am seeing two weird behaviors I can't seem to resolve, and am wondering
if they are bugs or something I'm forgetting to...
|
by: alsmeirelles |
last post by:
Hi all,
I Have run this test:
Private Sub test()
Dim d As Double
Dim f As Single
Dim output As String
d = 8888888888888.8887
|
by: itsolution |
last post by:
Hi folks,
Could you shed some light on this issue?
my program is running on Freebsd as a daemon. When user sends a
request, it forks itself and lets its child process handles the
request....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |