Passing value from textbox to controller as a parameter
<p>So in my View I need a simple textbox like so:</p>

<pre><code> &lt;input type="text" name="CVR" placeholder="Enter CVR" required /&gt;
</code></pre>

<p>in the same view, at the end I have the submit button:</p>

<pre><code> @Html.ActionLink("Submit", "SendMail", new { studentId = Html.ViewData.Model.StudentId, companyId = Html.ViewData.Model.CompanyId, applicationId = Html.ViewData.Model.ApplicationId, companyCVR = Model.CVR})
</code></pre>

<p>The data works, until the "companyCVR = Model.CVR". I am having trouble changing "companyCVR" to the text the user inputs in the textbox above.</p>

<p>This is my controller constructor:</p>

<pre><code>public ActionResult SendMail(string studentId, string companyId, int applicationId, string companyCVR)
</code></pre>

<p>and technically, this should work:</p>

<pre><code>contract.CVR = companyCVR;
</code></pre>

<p>It works when I hardcoded (contract.CVR = "12345"). My problem is passing the value from the textbox to companyCVR which I am trying to pass as a parameter to the controller.</p>

<p>How can I solve this?</p>