/    Sign up×
Community /Pin to ProfileBookmark

how to create a cookie in a form and check if the cookie exist or not

how to create a cookie in a form and check if the cookie exist or not

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@saanvi_mehtaOct 07.2020 — you can check Cookies.Get(string), this will not modify the cookie collection.
Copy linkTweet thisAlerts:
@VITSUSAOct 08.2020 — This is a good option which saanvi_mehta have shared with you :)
Copy linkTweet thisAlerts:
@siddhi_patelOct 12.2020 — Hello..

Response.Cookies contains the cookies that will be sent back to the browser. If you want to know whether a cookie exists, you should probably look into Request.Cookies.

Anyway, to see if a cookie exists, you can check **Cookies.Get(string)**. However, if you use this method on the Response object and the cookie doesn't exist, then that cookie will be created.

see given Link For More About Cookie [About Cookie](https://www.w3schools.com/asp/asp_cookies.asp)
Copy linkTweet thisAlerts:
@agorapharmacyOct 12.2020 — Agora Pharmacy -100% Safe & Secure Overnight Delivery.

https://agora-pharmacy.com/[](url)
×

Success!

Help @ariesmangubat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...