Couple of issues with your code.
1) No
OnClick
Property set.
2) Remove that extra
true;
in your
onclientclick
. You are already returning
true
from your
returnTrue()
function. Change your code as below.
<asp:linkbutton id="cancel" runat="server" onclientclick="return returnTrue();" onclick="cancel_Click" >
3) If you noticed above I have assigned
cancel_Click
event to
OnClick
, then it should be defined in your code-behind.
void cancel_Click(object sender, System.EventArgs e)
{
}