title: How to pass Input value as parameter in @html.ActionLink
body: <p>I want to pass the value of a input type in a html.Actionlink so i tried the code below but it doesn't work </p>
  
  <pre><code>      @Html.ActionLink("EXPORT TO EXCEL", "ExportToExcel", "UserManagement", new { @class = "btn btn-primary" },
  new { ugid = $("selector").val() }
  </code></pre>
  
  <p>here is my controller</p>
  
  <pre><code> public void ExportToCSV(int ugid)
          {
              client.Open();
              List&lt;UserObjUserInfo&gt; userlistbyUGID = client.GetUserListByUGID(ugid, "token").ToList();
              client.Close();
  
              StringWriter sw = new StringWriter();
  
              sw.WriteLine("\"USER ID\",\"USERNAME\",\"NAME\",\"CREATE DATE\"");
  
              Response.ClearContent();
              Response.AddHeader("content-disposition", "attachment;filename=Exported_Users.csv");
              Response.ContentType = "text/csv";
  
              foreach (var user in userlistbyUGID)
              {
                  sw.WriteLine(string.Format("\"{0}\",\"{1}\",\"{2}\",\"{3}\"",
                                             user.ugid,
                                             user.username,
                                             user.name,
                                             user.CreateDate));
              }
              Response.Write(sw.ToString());
              Response.End();
          }
  </code></pre>