title: Insert command for asp.net
body: <p>I insert picture paths into database and when I get the path I display them with <code>img</code> tag. </p>
  
  <p>I can do it but I couldn't find the methods that I have to write after sql query. </p>
  
  <p>What I have to write after sql query?</p>
  
  <p>In <code>Page_Load</code> my select command works.</p>
  
  <pre><code> c = new Common(ConfigurationManager.ConnectionStrings["ahapp"]);
      string sql = "select Query";
      string str = "";
      DataTable dt = c.GetDataTable(sql);
      foreach (DataRow item in dt.Rows)
      {
          str += "&lt;img src='" + item["path"].ToString() + "' style='width:100px' /&gt;";
      }
  
      dokList.InnerHtml = str; 
  </code></pre>
  
  <p>This code always says:
  <img src="https://i.stack.imgur.com/8VJTU.png" alt="enter image description here"></p>
  
  <pre><code> sql ="INSERT INTO DR_OZLUK VALUES(3," + ddlDoktor.SelectedValue + "," + belgeid + ",3," + str + ",1)";
      SqlCommand cmd = new SqlCommand(sql, c);
      cmd.ExecuteNonQuery();
  </code></pre>