title: string not accepting " 's " while writing to database
body: <p>Hello everyone i am creating a settings page for another application using mvc4. In the settings page:</p>
  
  <p>1.It contains two text areas wherein the user can type anything.</p>
  
  <p>2.After typing if the user clicks submit button, the text he has written is saved in a sql database.</p>
  
  <p>3.The main application will read that data from the database and display it.</p>
  
  <p>Here are my respective codes:</p>
  
  <p>Model:</p>
  
  <pre><code> public string PartnerInfo1 { get; set; }
   public string PartnerInfo2 { get; set; }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[HttpPost]
          public ActionResult Index(AddDetailModel model)
          {
              pinfo1 = model.PartnerInfo1;
              pinfo2 = model.PartnerInfo2;
              SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Sample"].ConnectionString);
              con.Open();
              SqlCommand cmd = new SqlCommand("update dbo.Partner_Design set PartnerInfo1='" + pinfo1 + "',PartnerInfo2='" + pinfo2 + "' where [PartnerID]='cs'", con);
              cmd.ExecuteNonQuery();
              return RedirectToAction("Index");
          }
  </code></pre>
  
  <p>and in the view:</p>
  
  <pre><code> @Html.TextAreaFor(m =&gt; m.PartnerInfo1)
  @Html.TextAreaFor(m =&gt; m.PartnerInfo2)
  </code></pre>
  
  <p>in the database, the corresponding table contains two columns <strong>PartnerInfo1,PartnerInfo2</strong>  and their datatype is <strong>nvarchar(max)</strong>.</p>
  
  <p>My problem is when i type apostrophe in text area it gives me error.For example if i type "world's" it gives error on clicking submit button.</p>
  
  <p>This is the error:</p>
  
  <pre><code>Incorrect syntax near 's'.
  Unclosed quotation mark after the character string ''.
  </code></pre>
  
  <p>Please suggest what i can do to avoid this.Any help would be appreciated.</p>