title: Creating Button and OnClick Event from c# side - asp.net
body: <p>im creating a button from c# side like this:</p>
  <pre><code>content += &quot;&lt;button class='btn btn-info' runat='server' style='margin-left:4%' id='Like&quot; + dr[0] + &quot;' onclick='likeClick'&gt;&quot;;
  </code></pre>
  <p>And the event is really simple i just want to see if its working:</p>
  <pre><code>protected void likeClick(object sender, EventArgs e)
  {
      content = sender.ToString();
  }
  </code></pre>
  <p>But when i click the button it doesn't trigger the event, I put a break point in the event and I debugged but it didn't start the fucntion. I opened Inspect Element in the browser and clicked the button. It showed me this:</p>
  <p><a href="https://i.stack.imgur.com/revMG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/revMG.png" alt="enter image description here" /></a></p>
  <p>What am I doing wrong here?</p>