You could do something like this:
<asp:label id="Label5" runat="server" cssclass="myclass" text="<%#Eval("OrgJob_id")%>" onclick="upvote(this);return false;" xmlns:asp="#unknown"></asp:label>
function upvote(element) {
alert( $(element).text());
$.ajax({
type: "POST",
url: "searchig-page-seeker.aspx/voteup",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
if (msg.d == 'OnSuccess') {
alert("have a nice day");
return false;
}
else {
alert("have a no");
return false;
}
return false;
}
});
return false;
}
The 'element' parameter will contain the element that was clicked.