Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - converting cookie values

 
Thread Tools Search this Thread
Old 05-11-2004, 01:07 PM   #1
Default converting cookie values


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!


mike parr
  Reply With Quote
Old 05-11-2004, 01:45 PM   #2
avnrao
 
Posts: n/a
Default Re: converting cookie values
can you check whats there in strCookieValue while adding it to the cookie?

Av.
"mike parr" <> wrote in message
news:...
> 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!





avnrao
  Reply With Quote
Old 05-11-2004, 03:18 PM   #3
mike parr
 
Posts: n/a
Default Re: converting cookie values
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!


mike parr
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net Session Cookie Lost on mozilla/netscape After return from cross domain saurabhm Software 3 09-18-2009 12:36 PM
Values set by javascript are not reflected in serverside(.Net) rchimakurty Software 2 11-28-2007 10:07 AM
Checkbox values problem in gridview thanigaimani.thirumalai Software 0 11-09-2007 05:12 AM
Cisco QOS MIB values required manjunatht Software 0 09-11-2007 05:40 PM
HD-DVD and DVD's future Phil Riker DVD Video 68 09-28-2003 09:32 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46