Click here to Skip to main content
11,574,473 members (62,122 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB.NET
I converted this Code [^]
to vb.net
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 vb.net

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
Edited 21-Mar-13 2:21am
v2
Comments
ryanb31 at 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
good
Please Sign up or sign in to vote.

Solution 1

Try Solution provided at the below link :-

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


Implement ICallbackEventHandler interface on the page.
  Permalink  
Comments
mohammed besher at 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


Advertise | Privacy | Mobile
Web03 | 2.8.150624.2 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2015
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