title: save a c# string as a html file
body: <p>I have a c# script that at some point create a string variable, how can I save it as HTML file in the same directory of the script?</p>
  
  <pre><code> string saveHtml = "&lt;html&gt;" +
      "&lt;head&gt;" +
      "  &lt;title&gt;Select Image&lt;/title&gt;" +
      "  &lt;script type=\"text/javascript\"&gt;" +
      "  function displayImage(elem) {" +
      "    var image = document.getElementById(\"canvas\");" +
      "    image.src = elem.value;        " +
      "  }" +
      "  &lt;/script&gt;" +
      "&lt;/head&gt;" +
      "&lt;body&gt;" +
      "  &lt;form name=\"controls\"&gt;" +
      "    &lt;img id=\"canvas\" src=\"pictures/fire1.jpg\" /&gt;" +
      "    &lt;select name=\"imageList\" onchange=\"displayImage(this);\"&gt;" +
      "      &lt;option value=\"pictures/001JRPchargeable.png\"&gt;Fire 1&lt;/option&gt;" +
      "      &lt;option value=\"pictures/001JRPNonchargeable.png\"&gt;Fire 2&lt;/option&gt;" +
  "&lt;/select&gt;" +
  "  &lt;/form&gt;" +
  "&lt;/body&gt;" +
  "&lt;/html&gt;";
  </code></pre>