Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
CSS
Hi,

I got the below error when i click one asp:button.

JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

My coding contains : Update Panel, Jquery scripts, GridView and PostBackTrigger tags.

I tried few solutions by debugging in my local environment but none of them worked out.

Please help me on this.

Thanks..
Posted
Comments
Dave Kreskowiak 13-May-15 22:51pm    
Without seing the script that throws the error and on which line the error is thrown it is IMPOSSIBLE to help you.
Farook, Ahamed Mohideen 13-May-15 23:56pm    
When i click the button in aspx page, it stops @ throw error line and cannot process further.

function Sys$WebForms$PageRequestManager$_endPostBack(error, executor, data) {
if (this._request === executor.get_webRequest()) {
this._processingRequest = false;
this._additionalInput = null;
this._request = null;
}
var handler = this._get_eventHandlerList().getHandler("endRequest");
var errorHandled = false;
if (handler) {
var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
handler(this, eventArgs);
errorHandled = eventArgs.get_errorHandled();
}
if (error && !errorHandled) {
throw error;
}
}


My ASPX contains this script:
-------------------------------
<script>
$(function() {
afterLoad();
});

function afterLoad() {
$( ".DatePicker" ).datepicker({defaultDate: '',dateFormat:'dd/mm/yy'});

$(window).resize(function() {
$('.searchContent').height($(this).height() - $('.searchPanel').height() - $('.menuWrapper').height());
});
$('.searchContent').height($(this).height() - $('.searchPanel').height() - $('.menuWrapper').height());
$('.tablePanel').each(function (i) {
$(this).scroll(function() {
$.cookie('panelH'+i,$(this).scrollLeft());
$.cookie('panelT'+i,$(this).scrollTop());
})

$(this).scrollLeft($.cookie('panelH'+i));
$(this).scrollTop($.cookie('panelT'+i));
})

$("#ctl00_ContentPlaceHolder2_InsertBtn").click(function () {
return confirm('Do you really want to get a new Contract No?');
});

$($(".ContractPeriod tr")[0]).hide();
$($(".CustomerTypePlan tr")[0]).hide();
$($(".CustomerTypePlan tr")[1]).hide();
//$(".TermsCondition").hide();

if ($(".IsPurchase input[checked='checked']").val() == "True") {
$($(".ContractPeriod tr")[1]).show();
$($(".CustomerTypePlan tr")[2]).show();
$($(".CustomerTypePlan tr")[3]).hide();
$($(".CustomerTypePlan tr")[4]).hide();
$($(".CustomerTypePlan tr")[5]).hide();
$($(".CustomerTypePlan tr")[6]).hide();

} else {
/*$($(".ContractPeriod tr")[1]).hide();*/
$($(".CustomerTypePlan tr")[2]).hide();
$($(".CustomerTypePlan tr")[3]).show();
$($(".CustomerTypePlan tr")[4]).show();
$($(".CustomerTypePlan tr")[5]).show();
$($(".CustomerTypePlan tr")[6]).show();
}
}
</script>


If i click the button, i didn't get the confirmation dialog box(written in above script block).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900