Home > .NET, Ajax, HTML5, VB.NET > Sys.WebForms.PageRequestManagerServerErrorException

Sys.WebForms.PageRequestManagerServerErrorException

2017/04/18

Followed by:Object reference not set to an instance of an object.
I was struggling in an old Asp.Net site, which is using Microsoft Ajax Toolkit, with this error.

In order to reduce the postbacks i used some jquery for partial page updates, and using a simple html select with a button for change the parameter to a REST call, i got this error.
The problem solution is very simple.. the HTML button tag by default causes a postback, and the error was caused from a null value in the Page_Load event of the behind code: the button type must be “button”, otherwise without specifying the type is considered as “submit”.

Then the HTML is:

<button id="cmdUpdateByFilter" onclick="updateSint();" type="button" class="Botton">Update</button>

Advertisements
Categories: .NET, Ajax, HTML5, VB.NET
%d bloggers like this: