Ask a Question related to ASP.NET General, Design and Development.
-
dave #1
Cookie Trouble --> disappearing
I have 2 pages... in the first page i check to see for
the existance of the cookie, if found do something else
set the value and set the cookie.
(cookie gets set ok)
I use the following code to read and write the cookie..
READ..
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
WRITE
Dim c As New HttpCookie("HD")
c("DialogTypeID") = DialogTypeID.ToString
c.Expires = DateTime.Now.AddYears(1)
HttpContext.Current.Response.Cookies.Add(c)
Now i navigate to a second page which looks for a cookie
of a differnt name and reads the value. The following
code...
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD2")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
Now when i navigate back to the first page the first
cookie is gone. I look in my localhost cookies and it is
no longer in the cookie file. PLEASE tell me what is
going on.
please.
thank you in advance...
dave
dave Guest
-
HTTP::Cookie won't store sent cookie
Hi all, My script requests http://foo.bar.com/ with code that looks a little like this: my $ua = LWP::UserAgent->new; my $cookie_jar =... -
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,... -
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... -
VisualAge 6 installation trouble on aix 5.2, gcc trouble too :)
I've installed gcc 3.x from UCLA site. and I got this error - In file included from test.c:23: /usr/include/pthread.h:554: error: parse error... -
Can't get Yahoo groups to open, Cookie trouble
I get a message that my browser does not accept cookies when I try to get into Yahoo Groups. I have them enabled on my internet properties/security. -
Natty Gur #2
Re: Cookie Trouble --> disappearing
Hi,
if you dont set any of the cookies properties (Domain,Expires...) the
default is that cookie will be available for the current page. if you
navigate to other page the cookie die. when you use the Back button the
browser use cache version of the page. no call is made to the server so
no new cookie creat and the old one already vanished.
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Natty Gur #3
Re: Cookie Trouble --> disappearing
You are absolutely right and I’m WRONG! I guess I was confused at this
time, not to mention that dave set the expiration time. sorry!
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Luke Zhang [MSFT] #4
RE: Cookie Trouble --> disappearing
DId you also "write" cookies in the second web form? Additionally, when
will you write the cookies, after find that stmp is empty?
Luke
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Luke Zhang [MSFT] Guest



Reply With Quote

