title: Have anyone the same problem? Colorpicker in MVC
body: <p>I made a colorpicker in MVC it works but know it doesn't work anymore.
  I have this error "InvalidOperationException: Child actions are not allowed to perform redirect actions."</p>
  
  <p>I tried everything. tried some old code that was a test version. and it doesn't work.</p>
  
  <p>I am new to MVC. I make a webinterface to control ledstrips. </p>
  
  <p>Html code:</p>
  
  <pre><code>&lt;div class="Index-Wrapper"&gt;
  &lt;form action="/Lichten/LedStripOn" method="post"&gt;
      @Html.EditorFor(T =&gt; T.Color, new { htmlAttributes = new { @class = "form-control" } })
      &lt;button type="submit" value="Submit"&gt;ON&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;button type="button" onclick="location.href='@Html.Action("LedStripOff","Lichten")'"&gt;OFF&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p>ControllerCode :</p>
  
  <pre><code>// GET: Lichten
      public ActionResult LedStrip()
      {
          return View();
      }
  
      // GET: Lichten/LedStripOn
      public ActionResult LedStripOn(Models.LedStrip form)
      {
          if (ModelState.IsValid)
          {
              ViewBag.Kleur = form.Color;
              int R = Convert.ToInt32(form.Color.Substring(1, 2), 16);
              int G = Convert.ToInt32(form.Color.Substring(3, 2), 16);
              int B = Convert.ToInt32(form.Color.Substring(5, 2), 16);
  
              ViewBag.R = R;
              ViewBag.G = G;
              ViewBag.B = B;
  
              /*SerialPort mySerialPort = new SerialPort("COM5", 9600);
              mySerialPort.Open();
              mySerialPort.Write(1 + ";" + R + ";" + G + ";" + B);
              mySerialPort.Close();
              */
  
              return View();
          }
          else
          {
              return View("LedStrip", form);
          }
  
  
      }
  
      // GET: Lichten
      public ActionResult LedStripOff()
      {
          /*SerialPort mySerialPort = new SerialPort("COM5", 9600);
          mySerialPort.Open();
          mySerialPort.Write(0);
          mySerialPort.Close();
          */
          return RedirectToAction("LedStrip");
      }
  </code></pre>
  
  <p>Errormessage:</p>
  
  <pre><code>InvalidOperationException: Child actions are not allowed to perform redirect actions.
  </code></pre>