title: How to fire code behind method using onclick but not asp:button OnClick
body: <p>Im in asp.net and I already have a form that utilizes runat="server". I created another form on the page and I have a method in code behind that I need to run on an onclick event.</p>
  
  <p>Since I already have one form on the page, I can't use an asp:button with runat="server"</p>
  
  <p>What's the best way to get my method to fire using an onclick?</p>
  
  <p>Here's my code behind:</p>
  
  <pre><code>    protected void requestSong_Click (object sender, EventArgs e)
  {
  
      var artist = Request.Form["artist"].ToUpper();
      var song = Request.Form["song"].ToUpper();
      var song_Request = artist + " - " + song;
  
      SqlConnection con2 = new SqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString);
      con2.Open();
      SqlCommand cmd2 = new SqlCommand("insert into SONGS values (@REQUESTED_SONGS)", con2);
      cmd2.Parameters.AddWithValue("REQUESTED_SONGS", song_Request);
  
      cmd2.ExecuteNonQuery();
  </code></pre>
  
  <p>Here's my aspx:</p>
  
  <pre><code>    &lt;form id ="songRequest"&gt;
       &lt;p style="color:greenyellow"&gt; Request a song&lt;/p&gt;
        &lt;input type="text" placeholder="Artist" name="artist" id="artist" /&gt;
        &lt;input type="text" placeholder="Song Title" name="song" id="song" /&gt;
        &lt;button class="button" onclick="" id="requestSongButton" name="Submit"&gt;Submit&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>