title: Passing String value to controller on button click MVC2
body: <p>I am trying to send some value to controller on button click 
  Here is the view</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  
      &lt;h2&gt;Customers&lt;/h2&gt;
      &lt;table&gt;
      &lt;tr style=" background-color:White; font-style:normal; font-size:x-large;"&gt;
     &lt;td&gt;S#&lt;/td&gt; &lt;td&gt;Name&lt;/td&gt; &lt;td&gt;Email&lt;/td&gt; &lt;td&gt;Phone&lt;/td&gt; &lt;td&gt;Edit&lt;/td&gt;
      &lt;%int i = 1;
        string name, id, phone, email;
         %&gt;
      &lt;/tr&gt;
      &lt;% foreach (var clientsModel in ViewData["AllClients"] as List&lt;MvcApplication5.Models.ClientsModels&gt;){ %&gt;
      &lt;tr style=" background-color:black; font-style:oblique; color:Wheat; font-size:large;"&gt;
      &lt;td&gt;&lt;%:i %&gt;&lt;/td&gt;
      &lt;%     name = clientsModel.Name;
             phone = clientsModel.Phone;
             id = clientsModel.UserID;
             email = clientsModel.Email; %&gt;
          &lt;td&gt;
      &lt;label  id="Name"&gt;&lt;%= clientsModel.Name %&gt;&lt;/label&gt;        
      &lt;/td&gt;
          &lt;td&gt;
      &lt;label  id="Email"&gt;&lt;%= clientsModel.Email %&gt;&lt;/label&gt;        
      &lt;/td&gt;
          &lt;td&gt;
      &lt;label id="Phone"&gt;&lt;%= clientsModel.Phone %&gt;&lt;/label&gt;        
      &lt;/td&gt;
      &lt;td&gt;&lt;button id="edit" &gt;Edit&lt;/button&gt;&lt;/td&gt;
      &lt;/tr&gt;           
  
  &lt;%   i++;
  
  
         } %&gt;
  &lt;/table&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>and here is the controller to which i want to send the values</p>
  
  <pre><code>public ActionResult Edit(string name, string id, string phone, string email)
  {
      ViewData["name"] = name;
      ViewData["phone"] = phone;
      ViewData["id"] = id;
      ViewData["email"] = email;
      return View();
  }
  </code></pre>
  
  <p>i want to send the values of name, phone, email and id to controller... </p>