2011年4月30日星期六

Siderite's Blog: Invalid postback or callback argument in ASP.Net 3.5

origin: Siderite's Blog: Invalid postback or callback argument in ASP.Net 3.5

Also, you might get a Sys.WebForms.PageRequestManagerServerErrorException with code 500 when using Ajax. It usually happends when you click on a button in a GridView or another bound control. You expect it to work, but it doesn't, even if the code is relatively clear.

The answer is (probably) that you are binding the container bound control every time you load the page (instead of only on !IsPostBack). The thing is this used to work in ASP.Net 2.0.

Bottom line: check your binding, see if you are not doing any DataBind in between the button click and the eventual event catch.

没有评论:

发表评论