Question

I have a couple of classic ASP pages that require a user to enter their email and a specified 'keycode' that they have been given in order to gain access to a voucher that they can have emailed to them.

A voucher code is then dynamically generated and (currently) sent in the query string of the url to a second page that would then give the user the option to have the voucher emailed.

I now want to change this so that the voucher code is set as a session, rather than passing it via the url. But i'm having trouble trying to set the session.

I have pasted the code here in a Gist on github: http://gist.github.com/187622

The code errors on Line 47 as follows;

Microsoft VBScript runtime error '800a01a8'

Object required: 'Session'

/bennettsget/default.asp, line 47

I was wondering if anyone would be able to help? Apologies if my explanation or terminology is not correct. Classic ASP is not my language of choice, but it is one of those sites you inherit when starting a new job.

Thank you.

Was it helpful?

Solution

Remove the word "Set". Try

Session("fullcode") = fullcode

Set is usually used in conjunction with a full-blown object. When you're working with a Session, you're really setting a value for a collection rather than the creation of an object.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top