Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2008, 04:33 AM
Authorized User
 
Join Date: Aug 2008
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default ICallbackEventHandler Interface

As a part of registering the client side scripts on the server we generally use the below line

Page.ClientScript.RegisterClientScriptBlock(this.G etType(), "NewAsyncMethod", newFunction.ToString(), true);


where new function is

        string js = Page.ClientScript.GetCallbackEventReference(this, "arg", "OnServerCallComplete", "ctx", "OnServerCallError", true);

        //Create a wrapper method
        StringBuilder newFunction = new StringBuilder();
        newFunction.Append("function StartAsyncCall(arg, ctx) ");
        newFunction.Append("{ ");
        newFunction.Append(js);
        newFunction.Append(" } ");
        // Now register it


Question is :-

What is ctx in GetCallbackEventReference?

There is been only limited description about it that it is just a context. But wot context is it really? WHat need does it server?

 
Old August 25th, 2008, 04:36 AM
Authorized User
 
Join Date: Aug 2008
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What does ctx in the above serve? why is it required.

Is it some variable that can be passed to the server for processing

?

let me know

 
Old August 25th, 2008, 10:56 PM
Authorized User
 
Join Date: Aug 2008
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any luck?






Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT Interface mrame XSLT 4 November 21st, 2008 07:02 AM
ICallbackEventHandler.GetCallbackResult Problem tropicalpisces ASP.NET 2.0 Professional 0 August 11th, 2008 01:04 PM
Role of interface ajit Java Databases 1 July 1st, 2006 08:15 PM
Regarding Interface ndr1977 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 July 30th, 2003 09:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.