Wednesday, March 21, 2012

Declarative Postbacks in Beta 2

Hello,

I had a small script function to perform a declarative postback. This worked in the July CTP, and we are in the process of upgrading to Beta 2. It is erroring out on not being able to locate the Sys.WebForms.PostBackAction type. Has this been removed/moved? If so, could someone point me in the direction of where it is hiding?

function postbackFromJS(sender, e) {
var postBack = new Sys.WebForms.PostBackAction();
postBack.set_target(sender);
postBack.set_eventArgument(e);
postBack.performAction();
}

Thanks!

I looked around the PageRequestManager class and couldn't find much so it looks like it was removed, though not sure if it was renamed. The docs are lacking in this area.

Anyways, here's the class you can take a look around:http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/default.aspx


hello.

the postbackaction is defined on the preview.js file (ie, in the value-added bits).

No comments:

Post a Comment