Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Monday, March 26, 2012

Calling a JavaScript function after return from callback in UpdatePanel

Hi all.

I am trying to solve this focusing problem inherint in Atas, I have a 90% generic solution, but am missing the last piece to the puzzle.

I need a way to invoke a JavaScript function after the UpdatePanel has returned from a server callback.

I know this is pretty simple to do without an UpdatePanel, unfortunately I am kinda tied into the UpdatePanel.

Any help??

Thanks

Hi,

I had the same problem. This is the solution I could found.
See this post for reference:http://forums.asp.net/thread/1290506.aspx

function pageLoad()
{
$object("_PageRequestManager").propertyChanged.add(BindOnLoad);
}


function BindOnLoad(sender, args)
{

if (args.get_propertyName() == "inPostBack"){
if (!$object("_PageRequestManager").get_inPostBack()){
AtlasPostBack();}
}
}

function AtlasPostBack()
{ //Runs at every postback. This allows us to run things that need to be taken care of
//after postbacks

alert("partial postback is done");
}


Thanks,

I also found that from the server side, registering a script as a startup script will make it fire on every callback.

Page.ClientScript.RegisterStartupScript.

CAllback Http handler http module

Hi all,

Can anybody tell me how to generate callback.This call back should NOT be in on aspx page .

I this its solution is Http module or Http handler but i dont have idea to implement .Give me some reference and sample code or examples for implementing call back using http handlers or httpmodule

thanks

Could you please describe in more detail what you want? A callback (as in ICallbackEventHandler) that is not on a page does not make sense.


I HAVE A WEB CONTROL CLASS LIBRARY IN WHICH I HAVE A .js FILE ADDED AS RESOURCE FILE . FROM THIS FILE I WANT TO SEND A CALL BACK AS I WANT TO USE "AJAX". BUT AS FAR I KNOW I REQUIRES A .aspx.cs PAGE WHICH I CAN'T ADD IN THE CLASS LIBRARY. HOW WILL I DO THIS TASK.

ANY KIND OF HELP IS APPRECIATED


ICallbackEventtHandler can be implmented in a Controt, it not true that it can be only implmented in a page. For more details of creating controls with ICallbackeventHandler checkout this articlehttp://msdn.microsoft.com/msdnmag/issues/05/01/CuttingEdge/default.aspx