Instead of implementing System.Web.UI.ICallbackEventHandler as shown in http://msdn.microsoft.com/en-us/library/ms178209.aspx use DNN API. Something like:
Imports DotNetNuke.UI.Utilities
Partial Class DesktopModules_MyModule
Inherits DotNetNuke.Entities.Modules.PortalModuleBase
Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim callBack As String = ClientAPI.GetCallbackEventReference(Me, "arg", "ClientCallback", "context", "ClientCallbackError")
Dim clientFunction As String = vbCrLf & "<script type=""text/javascript"">" & vbCrLf & _
"function sendMsgToServer(arg, context){ " & callBack & "}" & vbCrLf & "</script>"
ClientAPI.RegisterClientScriptBlock(Me.Page, "sendMsgToServer", clientFunction)
End Sub
Public Function RaiseClientAPICallbackEvent(ByVal EVENT_ARGUMENT As String) As String _
Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler.RaiseClientAPICallbackEvent
Return "HELLO: " & EVENT_ARGUMENT
End Function
End Class
More documentatio on DotNetNuke Client API Client Callback ( http://www.dotnetnuke.com/LinkClick.aspx?fileticket=UBUhCCpW1d0%3D&tabid=478&mid=857 )
Best regards,
Zex