473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

What is session's namespace

ad
I want to manage session in a class's property like:

public class HealthSession
{
private int SelClassID, SelGradeID;

public int ClassID_Sel
{
get
{return Session["ClassID_Sel"];}
set
{Session["ClassID_Sel"]=value;}
}

But the it cannot find the namespace of Session.

What is session's namespace?
Nov 16 '05 #1
2 24373
ad ha scritto:
I want to manage session in a class's property like:

public class HealthSession
{
private int SelClassID, SelGradeID;

public int ClassID_Sel
{
get
{return Session["ClassID_Sel"];}
set
{Session["ClassID_Sel"]=value;}
}

But the it cannot find the namespace of Session.

What is session's namespace?


if you intend an ASP.NET Session the full class name should be
System.Web.SessionState.HttpSessionState

--
Free Download --> "AB...C#, Guida alla programmazione"
Il manuale per imparare c#, scaricalo da www.dotnetarchitects.it
email: na***************@qbgargnepuvgrpgf.vg (ROT13-encrypted)
Nov 16 '05 #2
better to use httpcontext since sessionstate may not always be available to
the calling module. for instance, in httpmodules, it may not be available

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________
"Antonio Pelleriti" <na***************@qbgargnepuvgrpgf.vg> wrote in message
news:11***************@tiglio.venaria.marelli.it.. .
ad ha scritto:
I want to manage session in a class's property like:

public class HealthSession
{
private int SelClassID, SelGradeID;

public int ClassID_Sel
{
get
{return Session["ClassID_Sel"];}
set
{Session["ClassID_Sel"]=value;}
}

But the it cannot find the namespace of Session.

What is session's namespace?


if you intend an ASP.NET Session the full class name should be
System.Web.SessionState.HttpSessionState

--
Free Download --> "AB...C#, Guida alla programmazione"
Il manuale per imparare c#, scaricalo da www.dotnetarchitects.it
email: na***************@qbgargnepuvgrpgf.vg (ROT13-encrypted)

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a...
25
by: kj | last post by:
Consider the following XML document: <?xml version='1.0' encoding='UTF-8'?> <bar:foo xmlns:bar='someuri'> <baz/> </bar:foo> What namespace does baz belong to? What is this namespace bound...
2
by: Tony Johansson | last post by:
Hello! I'm reading a book about C++ and there is something that I don't understand so I ask you. Below I have the text from the book and the code from the file where main is located and some...
2
by: dioscuroi | last post by:
Is there any difference between declaring in unnamed namespace and i global namespace? I can't recognize this p.s: Have a nice day ^_________ -
0
by: SA | last post by:
Hi all, VS 2005 beta 1, with .NET 2.0 beta 1. I am trying to see if I can get WSE 2.0 SP 1 to work with it. I need to find out what the name of the autogenerated assembly is, in order to...
2
by: ad | last post by:
I want to manage session in a class's property like: public class HealthSession { private int SelClassID, SelGradeID; public int ClassID_Sel { get {return Session;}
6
by: tshad | last post by:
Is there a reason to use session.remove over session.contents.remove? Don't they both remove the key and data from the contents collection? I assume that session(x) = nothing does essentially...
2
by: shumaker | last post by:
I'm confused about the default namespace setting in the project properties. Help has the following: "Default namespace Specifies the base namespace for all files in the project. For example,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.