How can I send a message from Javascript to C#?

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!



How can I send a message from Javascript to C# or VB?


For example, …

In the client side I have a background process that I need to send any data to my current App.

In VWG I have a javascript function called ‘SendMessage’

Public Sub SendMessage(ByVal str As String)
Dim strScript As String = String.Format(“document.getElementById(‘TRG_{0}’).contentWindow.SendMessageToComponent(‘{0}’, ‘{1}’);”, Me.ID, str)
VWGClientContext.Current.Invoke(Me, “eval”, New Object() {strScript})
End Sub

If I use this javascript  ….. SendMessage(‘wwwwwwwwwwwwwwwwwwwwwwwwwww’);’

I receive in VB Funtion:

And in my code inside the App I have a Function that receive this data…

Public Sub ReceivePushData(d As String)

‘here the d string is my data = ‘wwwwwwwwwwwwwwwwwwwwwwwwwww’

End Sub


More simple… I need to comunicate something from client in javascript to my App in or C#


  • You must to post comments

Fantastic, a developer that reads the documents. 🙂

You can either fire a message to a control or call a remote method.



  • You must to post comments
  • You must to post comments
Showing 2 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json mixin.theme