Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The status code returned from the server was: 500
My error is
Microsoft JScript 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
I have开发者_C百科 an UpdatePanel
, and a GridView
in it, and several TextBox
es on my webpage.In my gridview there are product informations, when I set the SelectedIndex
of my gridview as -1 for the start.
I run the code, and select a product from the gridview, it works fine.Then I click to another product on the gridview(meaning the selected index is changed) then I get the error at the top of my question.
A day ago, Infragistics tabs were used in this webpage for Tabs
, this error wasn't appearing, I am using Ajax TabContainer
now but I can't seem to handle this error.I tried adding ValidateRequest="false"
to my Page directive but that didn't work out.
Any ideas?Anybody encountered with this kind of error and solved?
Thank you in advance.
If I understood you correctly, it is an UpdatePanel problem in your page, here is the solution set EnablePartialRendering to false in the ScriptManager
I think it may help somebody
This issue comes when you have a control registered as an AsyncPostbackTrigger in multiple update panels.
Try adding the following right after the script manager declaration:
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args){
if (args.get_error() != undefined){
args.set_errorHandled(true);
}
}
</script>
For those who may encounter with the same problem and suffer from it.
For the idea to solve the problem check ValidateRequest page directive.
Well that is where I get the information about innerHTML-inner Text and HTMLEncode-HTMLDecode thing.
Then I used Server.HtmlEncode();
for every textboxes I have on that webpage.An example
UrunNoTextBox.Text = Server.HtmlEncode("");
change target platform of solution to 3.5
GO solution > Right Click > Property Pages > BUILD > TARGET FRAMEWORK
精彩评论