title: pass C# byte array to javascript
body: <p>i have a situation in which i have a byte array of a image in code behind C# class of a webpage (pop up page)</p>
  
  <pre><code>protected void ToFile(byte[] byteImage)
  
  {
              string strByte = byteImage.ToString();
              this.Context.Response.Write("&lt;script type='text/javascript'&gt;window.frameElement.commitPopup('" + byteImage + "');&lt;/script&gt;");
              this.Context.Response.End();
  }
  </code></pre>
  
  <p>i want to get pass byteImage to the handler function i.e .in javascript / on parent page</p>
  
  <pre><code>function onDialogClose(dialogResult,returnValue) {
          if (dialogResult == SP.UI.DialogResult.OK) {
              //var inputBuffer = new System.Byte(returnValue.length);
              //var byte = new Array();
              //byte = returnValue;
  </code></pre>
  
  <p>how to get the byte array at <code>returnValue</code> (now it contains System.Byte[]) only</p>
  
  <p>is there any way to access C3 byte[] array from Javascript??</p>
  
  <p>thankx</p>