标签:
public FileResult ExportMobileNoTxt(SearchClientModel model)
{
var sbTxt = new StringBuilder(); for (int i = 0; i < datalist.Count; i++) { sbTxt.Append(datalist[i].Mobile +"\r\n"); } byte[] fileContents = Encoding.Default.GetBytes(sbTxt.ToString()); return File(fileContents, "application/ms-txt", "MobileList.txt");
}
标签:
原文地址:http://www.cnblogs.com/starluck/p/4176294.html