title: How to save XML data in SQL Server?
body: <p>In my table there is one XML column. I want to fetch the XML data in one textbox and make some corrections and update it:</p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)
  {
       con.Open();
       string str = "select C1 from TableName where C2='" + txt1.Text+ "'";
  
       SqlCommand cmd1 = new SqlCommand(str, con);
       XmlReader xml = cmd1.ExecuteXmlReader();
       xml.Read();
  
       txt2.Text = xml.ReadOuterXml();
  
       XmlDocument doc = new XmlDocument();
       doc.PreserveWhitespace = true;
       doc.LoadXml(txt2.Text);
  }
  </code></pre>
  
  <p>Now I want to make some changes and update it in my database. When I try to change in textbox it does not work. How can I make changes and update in database? Please help</p>