title: Assigning javascript value to Controller variable in ASP.NET MVC View
body: <p>I try to assign javascript variable contentArea to content.Contents in my controller. How can I do that?</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  
          $("#btnTest").click(function () {
              var contentArea = tinyMCE.get("modalTextarea").getContent();
  
          });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Action:</p>
  
  <pre><code>    [HttpPost]
      public ActionResult Index(string test)
      {
  
          DBEntities dbTest = new DBEntities();
  
          tbl_Contents content = new tbl_Contents();
  
          content.RegisterDate = DateTime.Now;
          content.Title = "test";
  
          content.Contents = "content1";
  
          content.ImagePath = "image0";
  
          dbTest.AddToICE_tbl_Contents(content);
          dbTest.SaveChanges();
          return View();
  
      }
  </code></pre>