Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such
session really exists? I tried to use these sentences but ASP.NET doesn't
like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ... 8 2011
How about checking if the value is null?
"Carlos Albert" <nospam@noplace> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such session really exists? I tried to use these sentences but ASP.NET doesn't like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ...
You can ennumerate the Session.Keys collection.
Unfortunately it does not provide a "contains" function
-- addup --
Mhmm... and how could I just see if the session exists at all?
"addup" <ad*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com... You can ennumerate the Session.Keys collection. Unfortunately it does not provide a "contains" function
-- addup --
Visual doesn't allow my to use is null (or System.DBNull for the case)...
=(
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os*************@TK2MSFTNGP12.phx.gbl... How about checking if the value is null?
"Carlos Albert" <nospam@noplace> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such session really exists? I tried to use these sentences but ASP.NET doesn't like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ...
Oh, I found the way:
Dim xx as hashtable = session("hashtable")
if not xx is nothing then ...
Tnx everybody =)
"Carlos Albert" <nospam@noplace> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such session really exists? I tried to use these sentences but ASP.NET doesn't like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ...
Didn't release you were using VB.NET. C# has "null" and VB.NET has
"nothing".
"Carlos Albert" <nospam@noplace> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Oh, I found the way:
Dim xx as hashtable = session("hashtable") if not xx is nothing then ...
Tnx everybody =)
"Carlos Albert" <nospam@noplace> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such session really exists? I tried to use these sentences but ASP.NET doesn't like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ...
LOL, my fault... thanks ^^
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Oo*************@TK2MSFTNGP09.phx.gbl... Didn't release you were using VB.NET. C# has "null" and VB.NET has "nothing".
"Carlos Albert" <nospam@noplace> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Oh, I found the way:
Dim xx as hashtable = session("hashtable") if not xx is nothing then ...
Tnx everybody =)
"Carlos Albert" <nospam@noplace> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... Hello everybody,
I have SHOULD have a hashtable stored in a Session. How can I verify it such session really exists? I tried to use these sentences but ASP.NET doesn't like them, it says that session("hashtable") is not a string, or boolean...
if session("hashtable") then ...
if session("hashtable") <> "" then ...
ah -- I must have misunderstood the question
for VB.NET
If HttpContext.Current.Session Is Nothing Then This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pavel Vetesnik |
last post by:
Greetings!
I have some troubles with session variables. I can easily create a session,
but the variable I append to global session array ( $_SESSION) lasts only
until the end of current...
|
by: yukist |
last post by:
Hi all !
C# have a command like 'Session("abc") = 1' of Visual
Basic.NET?
TIA, yukist !
|
by: John Q. Smith |
last post by:
I'm trying to find out some of the details behind OOP
state management with SQL Server. For instance
- how long does the session object live on any server? Is
it created and destoyed with each...
|
by: Michael |
last post by:
I have a problem here that only seems to happen on the one new server that we are migrating our ASP.Net application to. The server is a Windows 2000 SP4 box. It initially had the .Net Framework...
|
by: Mr Newbie |
last post by:
I have written a Custom Control Menu. Its fairly simple but it works well
enough. In order to simplify things I decided to store the Menu1 custom
control in Session. In the page load event below,...
|
by: Big Daddy |
last post by:
I have an ASP.NET application where the user will be right in the
middle of doing something and the sessions ends and then it blows up
because I have stored some things in the Session hashtable. I...
|
by: Bhagya |
last post by:
Hello,
On the LogOut Page i have done Session.Abandon();
And on every Page, In the Page_Load Event i check if the session exists
and only then display data.
Now the problem is after i logout from...
|
by: Gordon Burditt |
last post by:
I had this idea about preventing session fixation, and I'm wondering
what anyone else thinks about it. The idea is, essentially, don't
allow session ids that YOUR PHP didn't generate (and aren't...
|
by: HemantSa |
last post by:
Session exists when i close browser in firefox...is there any way to remove the session if i open the new browser instance....
Regards,
Hemant Sandbhor
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
| |