Having trouble getting at the value of a Session variable

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top