473,398 Members | 2,404 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.

Having trouble getting at the value of a Session variable

Hi everyone, I have an .aspx file that is used by an external program to
perform a function. There is no code behind, all code and HTML is contained
in one file.

the structure is like this:

<% string strBlah = Request.Querystring("jdkfsd");

string userid =
Convert.ToString(HttpContext.Current.Session["UserID"]);
// more variables assigned from query string

%>

<html>
code here
</html>
The variables that are retrieving data from the QueryString are working
great, but for some reason I can not get the value in my session variable.

I can not change the format of this file, so, I'm kinda stuck there.

Does anyone have any idea of how I can get the Session variable value into
struserid?

Thank you in advance for the help,
tperri
Nov 19 '05 #1
1 1217
Jim
The question is, why do you expect "UserID" to be stored in the session?
Where was it set in the first place?

You mention the page is used by an 'external program', if it's making web
requests to your page in code, is it using a cookie store to enable session
tracking? Or am I not understanding this?

Jim

"tperri" wrote:
Hi everyone, I have an .aspx file that is used by an external program to
perform a function. There is no code behind, all code and HTML is contained
in one file.

the structure is like this:

<% string strBlah = Request.Querystring("jdkfsd");

string userid =
Convert.ToString(HttpContext.Current.Session["UserID"]);
// more variables assigned from query string

%>

<html>
code here
</html>
The variables that are retrieving data from the QueryString are working
great, but for some reason I can not get the value in my session variable.

I can not change the format of this file, so, I'm kinda stuck there.

Does anyone have any idea of how I can get the Session variable value into
struserid?

Thank you in advance for the help,
tperri

Nov 19 '05 #2

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

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
2
by: Alexandre Jaquet | last post by:
Hi, Under IE I could not point why I can't get the selected value from a function here the code function Lvl_P2P(url,closeIt,delay){ //ver1.0 4LevelWebs var fabricant_box; var...
1
by: KathyB | last post by:
Hi again, I save a fairly small xmlDocument to a single db field, xDoc.OuterXML using a SQL insert statement...this works fine. However, I then need to select that field (xmlWF) into an...
0
by: Najatte | last post by:
Hi , Anybody has any info about this subject. My target is as below: I have for example 5 sessions opened in Internet Explorer I am in a session and I want to access a variable exist in another...
14
by: aroraamit81 | last post by:
Hi, I am facing a trouble. I have some Session variables in my code and somehow my session variables are getting mixed up with other users. For example User A has access to 10 companies and...
9
by: devranger | last post by:
I am using the below CURL Function and can not figure out why it is not retruning the results from the post. Can anyone take a look and tell me what I may be doing wrong? I am just not seeing...
0
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value),...
13
by: SAL | last post by:
Okay, don't bash me to hard for my design on this app, it's my first web app and it's in production. My basic design is using Datatables created via the designer with a business logic class in...
2
by: sony.m.2007 | last post by:
Hi, When i try to set a value for a session variable I'm getting a object refence not set error I tried two methods as below HttpContext.Current.Session.Add("AppStartTime", DateTime.Now);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
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,...

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.