Convert session to binary value??

Posted by Oswaldlily under ASP.NET on 4/29/2013 | Points: 10 | Views : 693 | Status : [Member] | Replies : 2
Binary binaryvalue;
binaryvalue = HttpContext.Current.Session["name"];


Error:
Cannot implicitly convert type object to system.data.Linq.Binary.
An explicit conversion exist(r u missing a cast?)




Responses

Posted by: Jitendrasoft09 on: 4/29/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,
As you first store your session into string and then convert string into binary, please see below link lhat would be helpful for you.
http://stackoverflow.com/questions/5990231/convert-a-string-to-binary-sequence-in-c-sharp

Jitendra Kumar
If my post helps you, plz mark as an answer.

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 4/29/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
You can use like that as below code-
byte []arr = System.Text.Encoding.ASCII.GetBytes(str);

Jitendra Kumar
If my post helps you, plz mark as an answer.

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response