Advertisement
gkpoll

Untitled

Jul 10th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1.  string linkParaDisponibilizar = "~/GetFileContent.fwk?Id=" + oFileMetaData.Id;
  2.  
  3.  using (var ms = new MemoryStream())
  4.  {
  5.      TextWriter tw = new StreamWriter(ms);
  6.  
  7.  
  8.      tw.Write("blabla");
  9.  
  10.      tw.Flush();
  11.      ms.Position = 0;
  12.  
  13.  
  14.      string nomeArquivoTxt = "itensDaEdicao" + DateTime.Now.ToShortDateString() + ".txt";
  15.  
  16.      FileMetadata oFileMetaData = StorageManager.StoreFile(nomeArquivoTxt, "Sat.Pesef.Txts", ms);
  17.  
  18.      linkParaDisponibilizar = "~/GetFileContent.fwk?Id=" + oFileMetaData.Id;
  19.  }
  20.  
  21.  
  22. // no final desse código, linkParaDisponibilizar será o link para o arquivo TXT
  23.  
  24. string linkParaDisponibilizar = "~/GetFileContent.fwk?Id=" + oFileMetaData.Id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement