[thelist] ASP Questions

Burhan Khalid burhankh at hotmail.com
Mon May 20 14:40:00 CDT 2002


Lets see here :

[ snip ]
> **query_blurbid=session("commentblurbid")
> query_IP=request.servervariables("REMOTE_ADDR")
>
> Most of the above I understand .. just calling in the variables from a
form
> process.  However, I don't understand the one I've starred (**).  What's
> with the session?  I'm having problems with my comments being posted under
> the incorrect items .. and I'm guessing this is what might be feeding the
> incorrect information.  Why use "session" when the items are being passed
in
> the querystring?
>
> i.e. yadda.asp?commentblurbid=298
>
> Or just pass it hidden and request.form to get the variable in question?
> I'm not at all sure why to use "session" and what might else break should
I
> change it to querystring or hidden.
>
[ /snip ]

Disclaimer :

    I don't know what bloggin software this belongs to, I'm just responding
with my experience with blogging software and ASP

Firstly, the commentblurbid is a unique identifier so that the comments (and
I suppose its parent article/entry) can be identified.
Now, as for the seession part, I think the way it is writting, it is
actually *reading* from a stored session variable called "commentblurbid".
If you wanted to send it as a hidden item, you would have to find out where
it was being set originally, look for a line that has
session("commentblurbid") on the left hand side of the equal sign :

session("commentblurbid") = somthing

You would have to set it here orginally, and then it would be available for
that session (or untill your session timesout).
I would be careful setting its value somewhere in the middle, and not
checking where it was originally set.

For more information on sessions and ASP, check out :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html
/psdk/asp/iiwauslw.asp
hth,
Burhan Khalid








More information about the thelist mailing list