1
Reply

response.binarywrite issue

hlouzek

hlouzek

Mar 2 2004 2:48 PM
5.5k
Hi i am trying to convert the C# equivalent of this: Response.Buffer = TRUE Response.ContentType = "image/gif" [SOME CODE] Response.BinaryWrite(Chartspace1.GetPicture ("gif", 700, 450)) Response.End what ive done is this: Response.Buffer = true; Response.ContentType = "image/gif"; [SOME CODE] Response.BinaryWrite(objCSpace.GetPicture("gif", 700, 450)); Response.End(); However I am getting this error: - The best overloaded method match for 'System.Web.HttpResponse.BinaryWrite(byte[])' has some invalid arguments - Argument '1': cannot convert from 'object' to 'byte[]' im not sure whats going on because when i do this in c#: Response.Write(objCSpace.GetPicture ("gif", 700, 450).GetType()); i get this returned: System.Byte[] Am i missing some syntax somewhere?

Answers (1)