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.Queryst ring("jdkfsd");
string userid =
Convert.ToStrin g(HttpContext.C urrent.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 1 1232
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.Queryst ring("jdkfsd");
string userid = Convert.ToStrin g(HttpContext.C urrent.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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 webserver runs that part of the
script (see attached file, snippet.php), though, it doesn't go through.
I don't get an error message or anything...it just returns a "1"
(whereas it should return a "0") as far as I can tell. I have read the
PHP...
|
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 fabricant_value;
|
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 xmlDocument
to add nodes, etc., but haven't found the correct way.
I've also tried just saving it as a session variable, but still get
errors when I try to use it, so I know I'm doing something wrong!
|
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 session
(get the value) having only his session id.
I.e: I have session1 & session2 and in session1 I have variable v1
Now I am in session2 I want to access the value of v1 having only the
|
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 User B has access to
5, now when both of us hits to the server at the same time then their
session variables gets mixedup means either User A and USer B will have
now 5 companies or both have 10 companies. Now again when User A hits
to the server...
| |
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 it.
As you can see at the bottom of the script if (strstr($Line, 'HOUSTON
YAMAHA MOTORSPORTS')) then it is reading the correct page, otherwise if
(strstr($Line, 'Yamaha Dealer Locator')) then it is reading the
incorrect page of the initial URL...
|
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), inside the
Session_Start event of the global.asax.vb file, since this variable is
accessed by almost all the pages in the project. Besides this
variable, there are other session variables which are set in the
various aspx pages, as needed.
|
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 between the datatable and ObjectDataSources.
In one page I had a Gridview with select enabled. When an row in the grid is
selected, I retrieve the SelectedValue, store the value in a Session
variable and redirect the response to another web page,...
|
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);
HttpContext.Current.Session = DateTime.Now;
For the above two methods I'm getting error as
"Object reference not set to an instance of an object."
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |