Introduction
We all use Javascript on client side validation . but in case when we are using Update panel it does work.
Solutions
Code on Design page on Aspx.
$(".addcourse").click(function () {
$('#=hfShPnl%>').val('=valuehide%>');
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
if ($('#=hfShPnl%>').val() == 1) {
$("#pnelentry").hide();
}
if ($('#=hfShPnl%>').val() == 0) {
$('#pnelentry').show();
}
}
});
}