title: Replace static data in HTML page with dynamic one from database
body: <p>I have an HTML code for my asp.net web application is that when i press the button Submit it calls a function to read what's in the bd and load it into an html page with certain template and I want to know how to replace static data in the original HTML file with dynamic ones from mysql database using C#. In my code I did read the input file and i did create an output file to write in as shown below:</p>
  
  <pre><code>    StreamReader sr = new StreamReader("filepath/inputcv.html");
      StreamWriter sw = new StreamWriter("filepath/outputcv.html");
  </code></pre>
  
  <p>This is a part of the code i need to replace the content of this paragraph by the one in my database</p>
  
  <pre><code>&lt;div class="sectionContent"&gt;
      &lt;p&gt;@1&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I saw this code and I wanted to do like it but I don't know how to write the query in it</p>
  
  <pre><code>    StreamReader sr = new StreamReader("path/to/file.txt");
      StreamWriter sw = new StreamWriter("path/to/outfile.txt");
       string sLine = sr.ReadLine();
           for (; sLine; sLine = sr.ReadLine() )
          {
           sLine = "{" + sLine.Replace(" ", ", ") + "}";
          sw.Write(sLine);
          }
  </code></pre>