im creating a button from c# side like this:
content += "<button class='btn btn-info' runat='server' style='margin-left:4%' id='Like" + dr[0] + "' onclick='likeClick'>";
And the event is really simple i just want to see if its working:
protected void likeClick(object sender, EventArgs e)
{
content = sender.ToString();
}
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:
What am I doing wrong here?