I am having my data saved in my database as Longblob and while saving i am converting it to bytes and saving now while retrieving we can have that data by writing as follows
Byte[] bytes = (Byte[])dt.Rows[0]["Data"];
Response.BinaryWrite(bytes);
But what i need is i need that data in bytes to be represented as string is it possible
Dorababu MekaPosted Jun 24, 2011, 10:04 AM
http://msdn.microsoft.com/en-us/library/744y86tc.aspx
If your data is encode to string write as follows
string text = Encoding.UTF8.GetString(bytes);
If it's arbitrary binary data though, you should use base64 instead: