B
Brett Robichaud
When I check for a cookie in C# with this type of syntax:
string sID = Request.Cookies["User"]["ID"];
an exception is thrown if the cookie doesn't exist. Is there any way around
that, or some way to see if the cookie exists beforehand?
I need to load a dozen or so cookies, some of which will not exist, and
using a try/catch block makes this difficult if it could fail on any of
them.
-Brett-
string sID = Request.Cookies["User"]["ID"];
an exception is thrown if the cookie doesn't exist. Is there any way around
that, or some way to see if the cookie exists beforehand?
I need to load a dozen or so cookies, some of which will not exist, and
using a try/catch block makes this difficult if it could fail on any of
them.
-Brett-