Ask a Question related to ASP Database, Design and Development.
-
Arpan #1
Strange Cookie
In my ASP application, I am giving provisions to my users to search for
products based on the criteria furnished by them. I am doing this by making
the search Form post to itself & then redirecting the user to the page which
will display the items they had searched for. For e.g. if the search page is
named Search.asp & the page which displays the searched item is
Products.asp, then after the user provides his criteria in Search.asp & then
clicks the 'Submit' button, the user comes back to Search.asp after which
they are redirected to Products.asp. Products.asp is the page which finally
retrieves the product information from the database. In order to display the
relevant products, I am creating a cookie which will store the WHERE clause
for the SQL query that will be used in Products.asp. This is how I create
the cookie to store the WHERE clause:
<%
...................
strWhereClause=" Items.Price=" & Request.Form("txtPrice")
Response.Cookies("Search")("WhereClause")=strWhere Clause
...................
%>
& this is how Products.asp retrieves the products:
<%
strSQL="SELECT.......................WHERE " &
Request.Cookies("Search")("WhereClause") & " ORDER BY..........."
%>
Everything works out fine but the baffling point is when I open the
Temporary Internet Files folder (I am working on Windows 2000 Professional),
I find that the cookie which should have been created is not present in the
TIF folder i.e. no new cookie gets created!! How come this is possible? Let
me repeat that Products.asp retrieves the correct recordset depending on the
search criteria given by the user but I don't find the cookie anywhere!!!
Thanks,
Arpan
Arpan Guest
-
Cookies set one time, I delete cookie, cookie is never set again!
I am having this problem: My PHP script will set a cookie, it's there in my /Cookies folder. I delete the cookie (I have to for testing purposes,... -
Strange cookie behavior
Maybe the remote server is in a different time zone. Ray at work -- Will trade ASP help for SQL Server help "AHN" <anerse@excite.com>... -
authentication cookie vs session cookie
Hi, What are the differences between authentication and session cookies? In my web.config file, I set the cookieless attribute for the... -
#24713 [Opn->Bgs]: strange cookie behaviour
ID: 24713 Updated by: sniper@php.net Reported By: napalm at spiderfish dot net -Status: Open +Status: ... -
#24713 [NEW]: strange cookie behaviour
From: napalm at spiderfish dot net Operating system: redhat linux PHP version: 4.3.2 PHP Bug Type: Unknown/Other Function... -
Ken Schaefer #2
Re: Strange Cookie
There are two types of cookies.
Session cookies, and persistant cookies
Session cookies (not be confused with ASP sessions) are "in-memory" cookies.
They are stored in the browser's memory space, and are only valid for as
long as the browser's process is running. When the user closes the browser,
the cookie is destroyed.
Persistant cookies are written to the user's hard disk. To make a cookie
persistant you need to set an expiry date on the cookie. If you do not set
an expiry date, then the cookie is treated as a sesion cookie.
Cheers
Ken
"Arpan" <arpan_de@hotmail.com> wrote in message
news:eViT4k3kDHA.2312@TK2MSFTNGP12.phx.gbl...
: In my ASP application, I am giving provisions to my users to search for
: products based on the criteria furnished by them. I am doing this by
making
: the search Form post to itself & then redirecting the user to the page
which
: will display the items they had searched for. For e.g. if the search page
is
: named Search.asp & the page which displays the searched item is
: Products.asp, then after the user provides his criteria in Search.asp &
then
: clicks the 'Submit' button, the user comes back to Search.asp after which
: they are redirected to Products.asp. Products.asp is the page which
finally
: retrieves the product information from the database. In order to display
the
: relevant products, I am creating a cookie which will store the WHERE
clause
: for the SQL query that will be used in Products.asp. This is how I create
: the cookie to store the WHERE clause:
:
: <%
: ..................
: strWhereClause=" Items.Price=" & Request.Form("txtPrice")
: Response.Cookies("Search")("WhereClause")=strWhere Clause
: ..................
: %>
:
: & this is how Products.asp retrieves the products:
:
: <%
: strSQL="SELECT.......................WHERE " &
: Request.Cookies("Search")("WhereClause") & " ORDER BY..........."
: %>
:
: Everything works out fine but the baffling point is when I open the
: Temporary Internet Files folder (I am working on Windows 2000
Professional),
: I find that the cookie which should have been created is not present in
the
: TIF folder i.e. no new cookie gets created!! How come this is possible?
Let
: me repeat that Products.asp retrieves the correct recordset depending on
the
: search criteria given by the user but I don't find the cookie anywhere!!!
:
: Thanks,
:
: Arpan
:
:
Ken Schaefer Guest
-
Arpan #3
Re: Strange Cookie
Thanks, Ken, for your reply. Yeah, I hadn't set the expiry date for the
cookie. So it definitely must have been stored in the browser's memory space
as a session cookie.
Thanks once again,
Regards,
Arpan
"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:ONhvnMGlDHA.2432@TK2MSFTNGP10.phx.gbl...cookies.> There are two types of cookies.
>
> Session cookies, and persistant cookies
>
> Session cookies (not be confused with ASP sessions) are "in-memory"browser,> They are stored in the browser's memory space, and are only valid for as
> long as the browser's process is running. When the user closes thepage> the cookie is destroyed.
>
> Persistant cookies are written to the user's hard disk. To make a cookie
> persistant you need to set an expiry date on the cookie. If you do not set
> an expiry date, then the cookie is treated as a sesion cookie.
>
> Cheers
> Ken
>
> "Arpan" <arpan_de@hotmail.com> wrote in message
> news:eViT4k3kDHA.2312@TK2MSFTNGP12.phx.gbl...
> : In my ASP application, I am giving provisions to my users to search for
> : products based on the criteria furnished by them. I am doing this by
> making
> : the search Form post to itself & then redirecting the user to the page
> which
> : will display the items they had searched for. For e.g. if the searchwhich> is
> : named Search.asp & the page which displays the searched item is
> : Products.asp, then after the user provides his criteria in Search.asp &
> then
> : clicks the 'Submit' button, the user comes back to Search.asp aftercreate> : they are redirected to Products.asp. Products.asp is the page which
> finally
> : retrieves the product information from the database. In order to display
> the
> : relevant products, I am creating a cookie which will store the WHERE
> clause
> : for the SQL query that will be used in Products.asp. This is how Ianywhere!!!> : the cookie to store the WHERE clause:
> :
> : <%
> : ..................
> : strWhereClause=" Items.Price=" & Request.Form("txtPrice")
> : Response.Cookies("Search")("WhereClause")=strWhere Clause
> : ..................
> : %>
> :
> : & this is how Products.asp retrieves the products:
> :
> : <%
> : strSQL="SELECT.......................WHERE " &
> : Request.Cookies("Search")("WhereClause") & " ORDER BY..........."
> : %>
> :
> : Everything works out fine but the baffling point is when I open the
> : Temporary Internet Files folder (I am working on Windows 2000
> Professional),
> : I find that the cookie which should have been created is not present in
> the
> : TIF folder i.e. no new cookie gets created!! How come this is possible?
> Let
> : me repeat that Products.asp retrieves the correct recordset depending on
> the
> : search criteria given by the user but I don't find the cookie> :
> : Thanks,
> :
> : Arpan
> :
> :
>
>
Arpan Guest



Reply With Quote

