Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2008, 04:33 AM
Authorized User
 
Join Date: Aug 2008
Location: Dallas, Textas, USA.
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?

Reply With Quote
  #2 (permalink)  
Old August 25th, 2008, 04:36 AM
Authorized User
 
Join Date: Aug 2008
Location: Dallas, Textas, USA.
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

Reply With Quote
  #3 (permalink)  
Old August 25th, 2008, 10:56 PM
Authorized User
 
Join Date: Aug 2008
Location: Dallas, Textas, USA.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any luck?

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:16 PM.


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