开发者

mysql blob with mvc and nhibernate

开发者 https://www.devze.com 2023-02-09 15:54 出处:网络
I am trying to pull a blob from a mysql table and displ开发者_StackOverfloway it on an mvc view page.When I try to access it, it is just coming up as System.byte[].I tried adding tostring(), but get t

I am trying to pull a blob from a mysql table and displ开发者_StackOverfloway it on an mvc view page. When I try to access it, it is just coming up as System.byte[]. I tried adding tostring(), but get the same results. I also tried BitConverter.ToString, but then I get what appears to be a hex string (43-6F-6E-66.....).

How do I get plain text from that?

thanks


I was able to get this working by using Encoding.ASCII.GetString(myBlobField)

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消