title: Passing values though the submit button?
body: <p>I am trying to pass values thought the submit button of a form.</p>
  
  <p>These are the values i need:</p>
  
  <pre><code>[HttpPost]
          public ActionResult Upload() //string token, string filename, string moddate, object file
          {
              Dictionary&lt;string, string&gt; parameters = new Dictionary&lt;string, string&gt;();
                  parameters.Add("Token", token);
                  parameters.Add("FileName", filename);
                  parameters.Add("ModDate", DateTime.Today.ToString());
                  parameters.Add("File", file);
  
              String compleat = "Complete";  
              return View(compleat);              
          }
  </code></pre>
  
  <p>This is where i try get the values:</p>
  
  <pre><code>&lt;form action="/Home/Upload" method="post" enctype="multipart/form-data"&gt;
  &lt;label for="file"&gt;Filename:&lt;/label&gt;
  &lt;input type="file" name="file" id="file" /&gt;
  @string token = @Model.Token;
  @string fileName = file.tostring();
  @File actualfile = file;
  &lt;br&gt;
  &lt;input type="submit" name="submit" value="Submit" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>I would like to do something like this, my JavaScript is probably wrong as i am new to it.</p>
  
  <p>After the submit is clicked how can i access the variables from the home controller? </p>