In my code a user can like a post when they click on the following code:
<li><a href="#" runat="server" onserverclick="LikePost" class="icon fa-heart"><%# Eval("Likes") %></a></li>
This will run the function LikePost in the codebehind:
public void LikePost(object sender, EventArgs e)
{
//like post whit given id using a database query
}
but how can I give that function a parameter, because it needs the postid from the post that the user is going to like.