I have a imagebutton as following :
<asp:ImageButton ID="Send" runat="server" ImageUrl="~/images/send.gif" OnClientClick="javascript:return checkDataAndConfirmSendToVOA();" AlternateText="Send" />
when this button is clicked using my jquery i am looking for a hidden value if it is null I replace the image as follow:
$("input[id$='Send']").click(function(e) {
if($("input[id$=imageThumb]").val() == 0)
{
var errorImage = "../Images/add.png";
$('#drop').append('<div class="p" id="'+Id[1]+'_c"><div class="Image"><input name="thumbImage" type="hidden" id="thumbImage" value="' + Title +'" /><img src="'+errorImage+'" title="'+Title+'"/></div><div class="Info"><span class="name"> Name : '+Title+'</span> </div></div><div class="clear"></div>')
}
now how would I make sure the page doesn't submit if there is error? i.e. the user stay in same page and just show an error