on 10-08-2014 2:11 PM
Hi
I need put (save) some temporary data to client site. And then I need read this dada.
I decide use Cookies.
I set data using:
WDR_TASK=>REQUEST->SET_COOKIE(
exporting
NAME = 'MYDATA'
VALUE = 'test value'
).
I read data using this ways:
CALL METHOD LO_REQUEST->IF_HTTP_ENTITY~GET_COOKIE
EXPORTING
NAME = 'MYDATA'
IMPORTING
VALUE = zCookies
.
wdr_task=>REQUEST->GET_COOKIE(
exporting
NAME = 'MYDATA'
importing
VALUE = zCookies
).
WDR_TASK=>REQUEST->GET_COOKIES(
changing
COOKIES = myCookies
).
When I use read and set in same method, I got data. But when I read data in different methods (or I use F5 - refresh browser) I don't get data from cookies.
How can I set/get data on client site?
Minor but important question:
Is possible read from client browser (computer) unique text/value (something with I can identify client)?
Thank you
Hi
I try this scenario in ASP.NET.
When I want set I must use this code:
HttpCookie myCookie = new HttpCookie("UserSettings");
myCookie["testCookie"] = "my value";
Response.Cookies.Add(myCookie);
for get:
Request.Cookies["UserSettings"]["testCookie"]
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.