Click here to Skip to main content
13,052,669 members (63,660 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I converted this Code [^]
and I have this Problem
in C#

ClientScriptManager cm = Page.ClientScript;
          String cbReference = cm.GetCallbackEventReference(this, "arg","ReceiveServerData", "");
          String callbackScript = "function CallServer(arg, context) {" + cbReference + "; }";
          cm.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true);

I converted it to in

Dim cm As ClientScriptManager = Page.ClientScript
          Dim cbReference As String
          cbReference = cm.GetCallbackEventReference(Me, "arg", "ReceiveServerData", "")
          Dim callbackScript As String = ""
          callbackScript &= "function CallServer(arg, context)" & "{" & cbReference & "; }"
          cm.RegisterClientScriptBlock(Me.GetType(), "CallServer", callbackScript, True)

I have invalid operation exception in
cbReference = cm.GetCallbackEventReference(Me, "arg", "ReceiveServerData", "")
The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler.
Posted 21-Mar-13 2:10am
Updated 21-Mar-13 2:21am
ryanb31 21-Mar-13 8:33am
By the way, in ASP.Net you can have some pages in C# and others in VB.Net. It might be worth leaving C# pages in C# since they work.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try Solution provided at the below link :-[^]

Implement ICallbackEventHandler interface on the page.
mohammed besher 21-Mar-13 10:33am
thanks very much you are very helpful

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100