简体   繁体   中英

Pass Byte Array to Javascript

I am using SignalR for updating fields on client side using Javascript. I need to pass byte array as an object property. But it doesn't seem to be picking up and shows as either undefined or System.Byte[]. I also tried to create an extra string field in the object and tried to convert byte array to string and pass it. But both techniques are passing unique or undefined characters. Any suggestions on how to pass data between two sides?

Base64 encode the string. Here's a good JS Base64 encoder/decoder: http://jsbase64.codeplex.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM