By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,602 Members | 1,457 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,602 IT Pros & Developers. It's quick & easy.

converting cookie values

P: n/a
I'm creating a cookie by this method :

HttpCookie objCookie = new HttpCookie(strCookieName);
Response.Cookies.Clear();
Response.Cookies.Add(objCookie);
objCookie.Values.Add(strCookieName, strCookieValue);

But when I read the cookie, I can't convert the value (strCookieValue)
to an integer. I get the error 'Input string was not in a correct
format'.
Can anybody help me out with this?
Thanks,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
can you check whats there in strCookieValue while adding it to the cookie?

Av.
"mike parr" <mp********@yahoo.co.uk> wrote in message
news:ec**************@TK2MSFTNGP09.phx.gbl...
I'm creating a cookie by this method :

HttpCookie objCookie = new HttpCookie(strCookieName);
Response.Cookies.Clear();
Response.Cookies.Add(objCookie);
objCookie.Values.Add(strCookieName, strCookieValue);

But when I read the cookie, I can't convert the value (strCookieValue)
to an integer. I get the error 'Input string was not in a correct
format'.
Can anybody help me out with this?
Thanks,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2

P: n/a
Thanks, I found a solution...I was reading the name-value pair instead
of just the value.
Mike
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.