473,379 Members | 1,544 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,379 software developers and data experts.

Session variables in shared class

I have a shared class as a part of a ASP.NET project. I'm adding routines
that are used on all the WebForm aspx.vb pages. I can't figure out how to
read the session variables in this class. sX = CSTR(Session("XMAN")) tells
me I cannot refere to an instance name of a class from within a shared
method ...
Nov 18 '05 #1
2 1444
System.Web.UI.HttpContext.Current.Session

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"David A. Beck" <da****@beckb.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
I have a shared class as a part of a ASP.NET project. I'm adding routines
that are used on all the WebForm aspx.vb pages. I can't figure out how to
read the session variables in this class. sX = CSTR(Session("XMAN")) tells me I cannot refere to an instance name of a class from within a shared
method ...

Nov 18 '05 #2
Thanks.

David A. Beck
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:eO**************@TK2MSFTNGP09.phx.gbl...
System.Web.UI.HttpContext.Current.Session

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"David A. Beck" <da****@beckb.com> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
I have a shared class as a part of a ASP.NET project. I'm adding routines that are used on all the WebForm aspx.vb pages. I can't figure out how to read the session variables in this class. sX = CSTR(Session("XMAN"))

tells
me I cannot refere to an instance name of a class from within a shared
method ...


Nov 18 '05 #3

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

Similar topics

2
by: Bonj | last post by:
H I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist...
4
by: John Kraft | last post by:
Hi all, My question is more of a phylisophical one here, but I am wondering what the difference is (effectively and performance wise) between using a shared variable/static variable and using a...
2
by: Don | last post by:
I'm asking this for a friend of mine, so forgive me if I'm getting some of the terminology wrong (I don't have any experience with ASP.NET). I've got an ASP application that has some classes that...
2
by: Stuart | last post by:
Hi there I am using several processes within an .asp application that store variables in to session - typically: Session("UniqueName") = Value I am having a hell of a time overwriting the...
15
by: Jason | last post by:
Currently, I am storing information about the currently logged on user in Session variables that are stored in SQL. However, I am using role-based security, so I am storing custom roles in a...
9
by: Randy | last post by:
Hello, I'm having a strange problem. I've got a .NET web app which uses Session variables. Sometime, not all the time, they get cross threaded...that is...one user will have another user's Session...
2
by: Ibrahim. | last post by:
Hello, My question is simple. If Session variables were to be assigned a value inside a shared function, does the session data visible to other sessions (Other users). I know the variables...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
17
by: Control Freq | last post by:
Hi, Not sure if this is the right NG for this, but, is there a convention for the variable names of a Session variable? I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
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...
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...
0
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 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.