Somehow that codebehind paste got corrupted. Here it is again.
Imports DotNetNuke.UI.Utilities
Partial Class VBTest
Inherits System.Web.UI.Page
Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler
Protected Sub ParentOnLoad(ByVal sender As Object, ByVal e As System.EventArgs)
ClientAPI.RegisterDNNVariableControl(Me)
End Sub
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
MyBase.OnInit(e)
If ClientAPI.NeedsDNNVariable(Me) Then
AddHandler Me.Load, AddressOf ParentOnLoad
End If
End Sub
Public Function RaiseClientAPICallbackEvent(ByVal eventArgument As String) As String Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler.RaiseClientAPICallbackEvent
Return DateTime.Now.ToString()
End Function
Protected Sub btnSetVarOnServer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSetVarOnServer.Click
ClientAPI.RegisterClientVariable(Page, "ServerVar", "This is a server variable", True)
End Sub
End Class