Advertisement
gkpoll

Untitled

Jul 10th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. string linkParaDisponibilizar;
  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.                 // no final desse código, linkParaDisponibilizar será o link para o arquivo TXT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement