Return file download from byte[]

前端 未结 3 1816
灰色年华
灰色年华 2021-01-21 05:20

This code

string xml = XmlHelper.ToXml(queryTemplate);

byte[] xmlb = StringHelper.GetBytes(xml);

var cd = new System.Net.Mime.ContentDisposition
{
    // for e         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 05:33

    I have had the answer for this, it turns out the problem was character encoding.

    The solution link is below

    Converting string to byte[] creates zero character

提交回复
热议问题