Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Save JavaScript Cookies in ASP Cookies

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
mafifi Posted - 11 March 2010 : 13:27:42
I have a web page that pulls information from different applications on diffrent servers. One such application sends JavsScript cookies data to the client. Is it possible to grab these values and stuff them in ASP Session Variables or Cookies? I would love to see a working sample.
8   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 12 March 2010 : 11:12:23
I'm still not following what you are trying to do,
You can't send information form A to B as javascript cookies, cookies are NOT javascript cookies are text files stored on the clients machine.

What is application A ? if it is able to write a cookie, then application B can just read them using ASP (by the way ASP is not a language either so can be vbscript or javascript), what are you trying to do exactly, pleasse explain more.
Shaggy Posted - 12 March 2010 : 10:19:35
As Huw said, cookies operate independent of language so you could set the cookie in application A before transferring to application B which would then be able to read the cookie.

mafifi Posted - 12 March 2010 : 07:09:52
Here's what I would like to happen:

Application 'A' (Non ASP) will authenticate the user and send the 'User Information' to application 'B' (ASP) as JavaScript cookies. I want to delete the JavaScript cookies as soon as I am able to hold their values in ASP session variables and some of the 'User Information' will be encrypted and saved in a persistent ASP cookie to be used as needed throughout the application.
HuwR Posted - 12 March 2010 : 04:27:09
maybe if you explain what you are trying to achieve we can offer suggestions, writing a cookie from the client and then trying to read it from the server without a postback just won't work, so what exactly are you trying to accomplish ?
mafifi Posted - 11 March 2010 : 19:23:06
This is the problem which I am trying to resolve. I am thinking about using Ajax to refresh the page and pull the cookie value(s).
HuwR Posted - 11 March 2010 : 18:02:27
well you won't because the asp code gets executed on the server before the page is sent to the client and then the javascript runs. so there is no cookie at the time request.Cookies is called
mafifi Posted - 11 March 2010 : 16:07:33
quote:
Originally posted by HuwR

not sure what you are after, a cookie is a cookie it is a text file saved on the users machine they are language agnostic so you can just read them using ASP the same as you can read them using javascript



This is what I am trying to do:


<script language="javascript" type="text/javascript">
    document.cookie = "mycookie=2; expires=1/1/2020; path=/;";
</script>


<%
Dim myBrownie
'get the cookie
myBrownie = Request.Cookies("mycookie")
Response.Write("You ate " & myBrownie & " brownies")
%>


I do not see the value of the cookie until after I refresh the page.
HuwR Posted - 11 March 2010 : 14:25:36
not sure what you are after, a cookie is a cookie it is a text file saved on the users machine they are language agnostic so you can just read them using ASP the same as you can read them using javascript

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07