title: Upload image to server using C#/.NET and storing filename in DB
body: <p>I'm currently using the following snippet to insert data into a table in my database. It works great. But, I want to start adding filename data and not sure how to proceed.</p>
  
  <p>I have the following:</p>
  
  <pre><code>// Create command 
  comm = new SqlCommand(
    "INSERT INTO Entries (Title, Description) " +
    "VALUES (@Title, @Description)", conn);
  
  // Add command parameters
  comm.Parameters.Add("@Description", System.Data.SqlDbType.Text);
  comm.Parameters["@Description"].Value = descriptionTextBox.Text;
  comm.Parameters.Add("@Title", System.Data.SqlDbType.NVarChar, 50);
  comm.Parameters["@Title"].Value = titleTextBox.Text;
  </code></pre>
  
  <p>I also have a <em>File Upload</em> option. But, I don't know how to use this to do the following:</p>
  
  <ul>
  <li>move the file to my <em>images</em> directory and </li>
  <li>store the <em>filename</em> value in my table. </li>
  </ul>
  
  <p>I have added the correct <strong>enctype</strong> to my form but now a little lost.</p>
  
  <p>Can someone explain the best way to do this?</p>
  
  <p>Many thanks for any help with this.</p>