title: How do I create a text file on server or memory?
body: <p>How do I create a text file and write the contents of a string to it? I plan to reference to the text file later. It could be on the server (root folder) or anywhere where I can reference it. Below is the string contents</p>
  
  <pre><code> foreach (string s in strValuesToSearch)
              {
  
                  if (result.Contains(s))
  
                      result = result.Replace(s, stringToReplace);
  </code></pre>