title: ASP: Send a Request String from a Button onclick
body: <p>I'm using aspx and aspx.cs file.</p>
  
  <p>I need to have buttons onclick event which send data to the cs file to do something with the database.</p>
  
  <p>So far my only problem is how to send the data which is selected.</p>
  
  <p>My aspx page is</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;
      &lt;asp:Button ID="city" runat="server" Text="London" value="London" onclick="Page_Load" /&gt;  
     &lt;asp:Button ID="city" runat="server" Text="Paris" value="Paris" onclick="Page_Load" /&gt;  
     &lt;asp:Button ID="city" runat="server" Text="Madrid" value="Madrid" onclick="Page_Load" /&gt;  
  &lt;/form&gt;
  </code></pre>
  
  <p>and the aspx.cs page is</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)  
      {  
  
          String city= Request.QueryString["city"];
          SqlConnection sqlCon = new SqlConnection("xx");
          sqlCon.Open();
          SqlCommand sqlCmd = new SqlCommand("Select * from Table where City = city", sqlCon);
  ....
      }
  </code></pre>
  
  <p>so the problem is that i don't know how to send the chosen value. How can i do it? Thanks</p>