User-defined Object With Session Scope

How can I give a user-defined object session scope? From

http://www.microsoft.com/windows200...asp/iiwaobu.htm

I gather that it can be done, but there are no examples. Simply setting

Set Session("tag") = new MyClass

doesn't work.

View Replies


ADVERTISEMENT

Session Variables - Scope

There are many web sites on the server - each has a virtual directory pointer to a common directory containing frequently used routines. Scripts run from the virtual directory appear to have no access to session (or application) variables. Is this expected behaviour? Or have I yet to track down a bug?

View Replies View Related

User Defined Function

I have to Execute a User Defined function from ASP page and also the function returns a varchar. Could someone help me out with the code for this.

View Replies View Related

User Defined Personalization

I need someone to point me in the right direction. I would search, but I am not certain what I neen to search for. Here is what I want to do.

My Intranet homepage has four content-blocks of information. Each content-block has specific type of information (i.e. HR stuff or international stuff).

I'd like to add more of these content-blocks an give our employees the option of choosing which four they want to see.

Most portal technology offers this, such as My Yahoo. What kind of technology do I need to look into? Cookies? Are there any scripts that I can use to assist with this?

View Replies View Related

User-defined Class

This is my user-defined class
class ABC
public CC
end class

I make a instance of it and store it at the session
set ee=new ABC
ee.CC="hi"
set Session("myobject")=ee

But when i retrieve it and access the property of my
object, it said that The object does not support this
property or method, is that ASP cannot do this, or my
code has error?
set eee=Session("myobject")
response.write eee.cc

View Replies View Related

User Defined Personalization

I am looking to personalize my Intranet homepage were the user has the information they want on their page.

For example all their fav sites on the homepage, like the news headlines, email account already open for them, any suggestions of how to start or the best possible recources to use.

View Replies View Related

User Defined Tables

I am trying to get the list of all user defined tables from the Access database. If I use the following query in Access it's working fine and getting the result. But if I am trying to execute the query in ASP page, it's not working. I am getting an error ([Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'MSysObjects'.)

Can u please tell me the reason.


SELECT MSysObjects.Name AS TableName
FROM MSysObjects
WHERE (((MSysObjects.Type)=1)
AND ((MSysObjects.Flags)=0));

If you have anything, to extract user defined tables, please tell me. Either one works out for me.

View Replies View Related

User-defined Objects

How does one create user-defined objects in ASP? Sorta like the response and request objects, where you can do response.write, etc.

I'd like to create my own object called Customer, so I could do Customer.firstName, Customer.lastName, customer.age, etc. I couldn't find any helpful info on this topic on the Internet or in my ASP books.

View Replies View Related

User Defined Functions

I'm forced to use legacy ASP for a new project i am working on and seeing as how I never use ASP I needed a little help with something.

I need to create a function with optional parameters. I know in .Net I can use the "optional" keyword in the function definition to create optional parameters. can this be done in ASP 3?

View Replies View Related

User-defined Classes In Global.asa

I've read that one shouldn't include ADO objects in the Global.asa for the sake of performance, but would user-defined classes cause the same kind of performance hit? Assuming that they wouldn't, is it possible to do it?

I can't seem to figure out how to include them, nor find any reference to it in msdn.

Is there a way to do this? Or should I create a slew of Session variables? Code:

View Replies View Related

How To Get/set And Send The HTTP Headers(user-defined)

How to get/set and send the HTTP Headers(user-defined) coming from another domain/site]

In one SMS gateway project i need a great and urgent help from u all. There,the Service Providers sending the data thru "HTTP Headers" (For ex.sms-Id,sms-source [user defined]).

So i need to get and parse the name value pairs, and need to respond/send the same way as coining the "HTTP Headers" (For ex. sms-Id,sms-destination,sms-msg [user defined]).

View Replies View Related

Scripting Dictionary And User Defined Objects

ok - this works:
Dim X
X = CreateObject("Scripting.Dictionary")

X.add 1, "Hello"

This doesn't....
Dim X
X = CreateObject("Scripting.Dictionary")

Class Aprivate VEnd Class

Dim B
B = new A

X.add 1, B

Can anyone tell me how to make this work?

View Replies View Related

Application Object :: Allow Only One User To Access Form

I'm looking for a way to allow only one user to access my web form at a time. so that if there is a user using my web page / html form.. then the next user is directed to another page. So only one user is allowed access at any given time .I was hoping there is a way to do this with Application variables.

View Replies View Related

User Of Session

When is Session_OnEnd event working , ive tried Abandon , Timeout still its
not working. will a session end , while closing the browser window ??

View Replies View Related

SSL Without Session Object

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.

View Replies View Related

Session Object

I have a page with about 90 input fields all on one page, I would like to split it up into about 5 pages, with each one a next button.

I would like to know, must I put each value into a hidden field to reference on the last page, or should I use session objects?

Can I use a session like this?
session("property").Bathrooms = 2

View Replies View Related

User Login With A Session

I am trying to create a user login page that once a user has been logged in there name will appear on all pages in the top right hand corner. This is what i have so far the user logins in through my user page and then this page loads up Code:

View Replies View Related

Different User Session Timeouts

I want to have different user sessions timeout at different time intervals. How can we make this possible in ASP with and without using database tables.

View Replies View Related

Connection Scope

I created a ADODB.Connection object in Session On_Start and tried to connect to the databse On_Start. It is giving errors. Can't have a connection opened only once in a whole applicatio like VB.

The Con variable is available for the whole session but the connection state is not available for the whole session. Do I need to open a connection everytime I want to access a database????

View Replies View Related

Cookies Scope

I have problem regarding cookies collection in response object. the senario is. I have created a cookie on signin page using:

Response.Cookies("username") = "userid"

If i print the value of cookie on this page then it shows me the correct value.

when i print the value of this cookie in another page using response.write request.cookies("username")

It doesnt print any value.

I have checked for every security problem in my internet browser but havent got any result. i am using internet explorer 6.

View Replies View Related

Session Object Question

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.

View Replies View Related

Object Stored In Session

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:

View Replies View Related

Session Object Expiring

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

View Replies View Related

Session Object Variable

I have a class declared as this:

Class CShoppingCart
dim sTableName

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 ....

View Replies View Related

Type Of Session Object

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?

View Replies View Related

Session.timeout Object

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?

View Replies View Related

Reg. Admin Terminating A User Session

In our project, we have a situation where the administrator needs to 'force log off' a particular user under certain conditions. In other words, the admin user needs to have the ability to kill any other user's session.

Is this possible? By using the session properties, we can kill the current session (the current user's session) but is it possible (for the admin user) to kill some other user's session?

View Replies View Related

User Login And Session Variable

i have created a script that queries a database for a username and password, and if they are valid sets a session variable to TRUE and redirects to another page. the table which contains the user information is called "Users" with the fields "UID", "PWD", "FIRSTNAME", "LASTNAME", and "EMAIL". my question is, how can i set a session variable to use the FIRSTNAME record for the particular user that logs on? my code is below. I've already got a session variable to display the UID record in the BookingSysV1UserName session variable.

View Replies View Related

Inform A User If Their Session Has Expired?

What's the best way to inform a user if their session has expired? It seems like upon logging into the system, when the first variables are created I could create a session variable that just stores a number, and then at the top of every page check to see if that variable is empty or not, but I'm not sure. What's the best way to do this? And if that is the best way, do I just compare it to a string of ""? or null?

View Replies View Related

Upload Files By User's Session

I am looking for a good sample or if anyone can provide me a code that would allow a user to upload documents, and be able to get only the ones he/she has uploaded only (by their loging session).

However, I would also need the code to have an administrator look at all the users uploads. I think I can manage to create the file for the administrator. But I have no idea how to start the uploading one.

View Replies View Related

User Problems With Session Variables

I've got an application which uses the Dreamweaver login script - which basically stores a username into a session variable if you login successfully. Then the other pages check the session variable to see if you're logged in. The problem is: I'm finding that a lot of users cannot log in because they can't access the session variable, or something like that. I suspect that it's due to them disabling cookies on their browser.

Does anyone know of a way to get round this? I know that online banking uses cookies, and they seem to have no trouble with that. Is it because they use SSL, and therefore the browser lets them through? Moving to a SSL space is something I would consider. We can't be sure what other software is on the user's machine either, and I think I may have had trouble with ZoneAlarm in the past too. What's the best way of getting round all this?

View Replies View Related

Session Variables, Store User Id Etc

Is this a good idea, or do people use different approaches ? Believe there's a 20 minute time period for em which doesn't sound like what l need.

View Replies View Related

Variable Scope And Functions

Basically, I have an asp application that uses a database connection,
and I want to declare (create) that connection in an include and use it
throughout the application in various functions. I've tried making the
connection object a public variable, a constant, making the functions
public, passing the connection object in byRef, byVal, etc... I just
can't get it to work. Is this not possible in classic ASP? Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved