Click here to Skip to main content
15,881,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I converted this Code [^]
to vb.net
and I have this Problem
in C#

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 vb.net

VB
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
Updated 21-Mar-13 2:21am
v2
Comments
ZurdoDev 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

Try Solution provided at the below link :-

http://forums.asp.net/t/953036.aspx/1[^]


Implement ICallbackEventHandler interface on the page.
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900