title: How to pass querystring value in @Url.Action in MVC4
body: <p><br/>
  I passed a querystring value in _Layout.cshtml page</p>
  
  <pre><code> &lt;li&gt;@Html.ActionLink("Contact", "Contact", "Home")&lt;/li&gt;
   &lt;li&gt;@Html.ActionLink("Shopping", "Index1", new { controller = "Shopping", UserID = "Admin" })&lt;/li&gt; 
  </code></pre>
  
  <p><br/>
  <strong>How to pass the value in the View Index1.cshtml page</strong>
  <br/></p>
  
  <pre><code> &lt;a href="@Url.Action("Delete","Shopping", new { id = Request.QueryString["UserID"] })"&gt;
   &lt;img alt="removeitem" style="vertical-align: middle;" height="17px" src="~/Images/remove.png" title="remove" /&gt;
   &lt;/a&gt;
  </code></pre>
  
  <p>I am not getting the querystring value in my controller </p>
  
  <pre><code>public ActionResult Delete()
  {
      string id = Request.QueryString["UserID"];
      int records = DeleteItem(id);
      if (records &gt; 0)
      {
          return RedirectToAction("Index", "Shopping");
      }
      else
      {
          ModelState.AddModelError("", "Can Not Delete");
          return View("Index");
      }
  }
  
  public int DeleteItem(string id)
  {
      con.Open();          
      SqlCommand cmd = new SqlCommand("delete from Cpecial_Shopping_Cart_tbl where [User ID]='" + id + "'", con);         
      return cmd.ExecuteNonQuery();
  } 
  </code></pre>