ASP.NET - fail to convert parameter value from byte[] to byte

Asked By msakt on 29-May-12 12:35 AM
private byte[] BillImage = null;

      public byte[] BillImage1
        get { return this.BillImage; }
        set { this.BillImage = value; }
i am using like this
 db.AddInParameter(command, "@BillImage", DbType.Byte, dto.BillImage1);

in db have image datatype........

how can i change
Jitendra Faye replied to msakt on 29-May-12 12:44 AM
Try like this-

cmd.Parameters.Add(new SqlParameter("@fileData", (object)FSize ));

Here FSize is byte array.