need to store the data in Binary format for the Uoploaded file

2 posts, 0 answers
  1. Gopi
    Gopi avatar
    15 posts
    Member since:
    Jan 2013

    Posted 09 Jan 2015 Link to this post

    protected void Button1_Click(object sender, EventArgs e)
        int PartyRowId = 0;
        foreach (UploadedFile file in AsyncUpload1.UploadedFiles)
            byte[] bytes = new byte[file.ContentLength];
            file.InputStream.Read(bytes, 0, Convert.ToInt32(file.ContentLength));
            string json3 = "{'PartyRowId':" + PartyRowId + ",'CommonCategoryRowId':" + PartyRowId + ",'CommnonCategoryAttributesRowId':" + PartyRowId + ",'PartyDoc':" + bytes + "}";

    Here i am getting json as


    Not retreving the byte info.....

    could u pls help me
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1966 posts

    Posted 14 Jan 2015 Link to this post


    Actually in this case the "bytes" variable will contain the binary data of the uploaded file. For example you can store it in the data base.

    Boyan Dimitrov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top