Public Property Let TableName (sNewTableName)
if sNewTableName <> "" Then
sTableName = sNewTableName
end if
End Property
Public Property Get TableName ()
TableName = sTableName
End property
.....
Then in a login page i do this
Set Session("cart") = New CShoppingCart
so now, the cart is a session object that can be called from every page in this session BUT.... when i do this in a different page:
Response.Write Session("cart").TableName
I get an asp error (Erreur d'exécution Microsoft VBScript (0x800A01B6) )saying this is not a supported method (the error is actually in french! i can paste it if u want)
The object seems to be valid (IsNull return false and IsObject returns true) but i cannot invoke its methods and read its properties ....
i am getting this error 'object variable users not set' , can anyone help with what it means, the variable has been set in a global.asa file and i cant figure out what is wrong.
I've made some progress with the form I was struggling with Friday - basically, I'm trying to write an online application that lets people upload their resume, references and supporting material.
Not everyone will have supporting material, so I'm trying to write something that will just ignore any fields where someone hasn't uploaded. If someone hasn't uploaded a file for each form field, the code below gives me Code:
Im having a few prblems with object recordset and variables. I can print data into a table using objrecordset("Type").
But when i try to assign the value to a variable, ex. variable1=objrecordset("Type") i get an invalid use of null error. If i take out the code to assign it to a variable it works fine. So my question is how can i assign the value of objrecordset("type") to variable1.
i built an adminisrator page that needs to be under SSL,when its under SSL i cant use the Session object so i cant really know if he is an administrator. i can make a unique password to the page but the problem is its a page that reloaded often to show different things & then each time he will need to enter the password, a little bit annowing.
I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:
I am working on a web store that has been having some problem with memory leakage; so I am working thought my code and I am just following up on an issue I have discovered I don’t know the answer to. I am self taught so if my question looks stupid please bear with me.
Set objMyObject = Server.CreateObject(Name)
Do I need to use the objMyObject.Close? before the Set objMyObject = Nothing is called? Could someone please explain or expand as to when and why I use the .Close call.
I created a class ImageEdit to help me get more from an image component i'm using. The class has few private properties and public methods. One of the methods is the Load() method which requires 1 parameter: the complete path to the image.
As long as i have the class definition included in the page and create and instance of the class on a page and use the properties and methods, everything is fine. The problem arises when i try to set this instance in a session variable like so:
set session("imageedit") = new ImageEdit
And this also seems to work fine as long as i'm still executing the code on the same page the new object has been created on. However... i can not get this object to work on any other page. Weather i use this: Code:
This is a strange thing. My Session object is expiring when the page is refreshed.This is happening in just one partiular page. Rest of the pages are working fine
I would like to be able to get the type of object that a session variable contains (for example, determine whether it is a string, integer, single precision floating point, ADODB.Recordset, etc...)
I need to know this for a ASP <----> ASP.NET session management script I am writing. I would like to be able just to copy strings and numbers. I already have code that does this, but I don't want my script to blow up when it finds a recordset in the session object.Is there any easy way to detect the object type in ASP?
I have a session object Session("login") whereas I need to extend the time on this to 1 hour, instead of the default 20 minutes. After initializing Session("login"), how would I change the timeout value?
I delete the files/cookies and clear history from the IE 6.0 browser and try to write in a text file use FSO but it dont write any thing in the file needs Code:
I'm trying to set a session variable after displaying a form, then capture the Session variable on postback. For some reason, the below code always returns the form, not the "Step 2" results part. What am I doing wrong? It's on a local network server, not on the web if that matters.
<% '* Step 2: Display results '********************************************** If Session("PageAction") = "view2" Then Response.Write "Results"
'* Step 1: Display form '**********************************************
I have created a session variable.... and i have to write code to check for this session for each ASP webpage in my website....Is there a alternative I do not want to repeat the same code for valid session.... in each page..
I first create a session variable 'client' in the login.asp file The login.asp file opens a file (xxx.asp) with an include file If I write <!--#include file="../../../data/" & session("client") & "/language_ger.inc"--> I have a message stating that the application can't find the file.
If I write the path without the variable (" & session("client") & ") <!--#include file="../../../data/eurovini/language_ger.inc"--> it works without any problem.
Question - is there is an error in the syntax? - is it possible to include this kind of variable in an include file. And if not, any idea to get the same result?
I'm new and I hope I explain this correctly.I have a products page which populate products dynamically with checkboxes. when the form is submitted, I check for selected boxes using the split(). My problem is, products page submits the form to client.asp, and within that page is client info. then the client page is submitted to confirmOrders.asp, which will display client info, and products selected. the split() works fine within the client.asp page. I'm trying to assign the checkboxs to a Session variable and use it on confirmOrder.asp. Then display the session variable on confirmOrders.asp page. I know I can do everything in one shot with confirmOrders.asp, but the client wants to display the client.asp page then the latter. hmm...hope this makes sense.
Is there a simple way to store session variable on the client-side javascript or retrieve the value of the session variable from the server-side session("variable") script onto the client-side script? I want to keep the value of user entry on the text field of an html form after refreshing.
The value of session variable is shown and the timeout value (60) shown as well. But immediately I get the error message "a timeout has been occurred, you have to log in again". If I make the highlighted sentence comment then I don't get the error.
Has somebody an idea why I receive immediately the timeout error?
A user field called 'Custom1' exists in my data base. This user field is used to hold a URL path to a custom download page for clients. Each client has their own unique URL which directs them to specific locations.What would the proper format be for the variable:
=Session("Cutstom1")
to be able to be displayed as a hyperlink with the label: "DOWNLOADS" while at the same time sending the current user to the 'value' / 'path' to which the Custom1 field contains? I am not an advanced coder and am just starting out with basics.
I assume that mostly,asp programmers use their own session variable to know whether a user is to be considered is-logged-on(together with a home-written log-on form web page).
However, I wonder if there is a convention for the name of such a variable?And does asp/iis have a built-in is-logged-on status variable? For example when IIS is to render a normal html page with an acl that invokes a basic authentication, can I as an asp programmer make use of that status variable, and can I write to it to force a logout programatically?
So, this is not about it there is a session as such, it is about beeing logge-on inside an asp-session. I've looked around but haven't found any good info on this.
I have drop down for selection of council - it is then passed to a session variable - it works fine to display the variable, but when I put it into a hidden field, if the value was Milwaukee it is fine, but if the value was Green Hills, it only puts Green in the hidden field. How can I fix this - I need it to put Green Hills in the hidden field.
when a session variable is declared,how long does that variable last?this isn't coming out of the global.asa.i'm pulling a field out of a db and declaring it with session(whatever)=whatever and then calling it out on the page.
i don't know where else to go, if there is a better or more appropriate forum for this question please let me know.
I have just moved to another isp host and some of my pages use session variables. I have a session variable, amongst others that hold the username and customer number to display data. The session variable value keeps disappearing giving me ADODB.Fielderror '800a0bcd' errors.
If i hot the refresh button a few times the session variable data comes back. Somebody please tell me they've experienced this 'cos i'm losing my mind ! I've updated the page to show the variable, and it does and i've removed underscores from filenames (apparently a possible problem with IIS 6)
i'm using the dundas freelib upload code to upload files in my website. when the user choses to upload a file a new window is opened and the upload procedure goes fine and the file is uploaded successfully. but the problem is the i want to know the name of the file in the parent window to save it in the database.
i tried to use a session variable which contains the name of the file but it dosen't work. the parent window contains a form which is used to insert new data in the database so i can't use the upload window to insert the filename in the database.
i don't know how to retreive the session variable from the previious page..i have also problem querystring application because the browser execute very slowly..and sometimes page will not be displayed.