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
C#
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 MekaRank #457 · 5.5K reputationPosted Jun 24, 2011, 6:04 AM EDT
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:
string text = Convert.ToBase64String(bytes);