title: how to pass data from view to controller
body: <p>I am new to asp.net MVC5 and i am trying to pass data from view to controller as a string.
  Here is controller class:</p>
  
  <pre><code>namespace Movies.Controllers
  {
      public class HelloWorldController : Controller
      {
          // GET: HelloWorld
  
          public ActionResult Index()
          {
              return View();
          }
          [HttpPost]
          public ActionResult welcome(FormCollection fc, string reportName)
          {
              ViewBag.Message = reportName;
              return View();
          }
      }
  }
  </code></pre>
  
  <p>Here is Index View:</p>
  
  <pre><code>@{
      ViewBag.Title = "MVC Movies";
  }
  &lt;h2&gt;My Movies List&lt;/h2&gt;
  
  &lt;p&gt;Hellow from our view template&lt;/p&gt;
  @using (Html.BeginForm("Welcome", "HelloWorld", FormMethod.Get))
  {
  
      &lt;p&gt;
          &lt;input type="text" name="reportName" /&gt;
          &lt;input type="submit" /&gt;
  
      &lt;/p&gt;
  }
  </code></pre>
  
  <p>Here is welcome view:</p>
  
  <pre><code>@{
       Layout = "~/Views/Shared/_Layout.cshtml";
  }
  &lt;h2&gt;welcome&lt;/h2&gt;
  @{
      ViewBag.Title = "Welcome";
  }
  &lt;ul&gt;
      @for (int i = 0; i &lt; 2; i++)
      {
          &lt;li&gt;@ViewBag.Message&lt;/li&gt;
      }
  &lt;/ul&gt;
  </code></pre>
  
  <p>Actually my Index method is passing a view that will have a textbox for string in it in a form and then on clicking submit button application should pass that string in the Welcome method in the same controller. On clicking submit button browser is showing a windows that resources con't be found.</p>
  
  <p>Whats the problem..? thank you for your time..:)</p>