Hi all..i make a program use javascript to call VB.Net function..but it doesn't work...can somebody help me to check this code...
Imports System.Runtime.InteropServices
<ComVisible(True)> _
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.ObjectForScripting = True
WebBrowser1.DocumentText = "<Script language='JavaScript'>" & vbCrLf & _
"function callfunction() { " & vbCrLf & _
"window.external.cfunction();" & vbCrLf & _
"}" & vbCrLf & _
"</script>" & vbCrLf & _
"<a href=# onclick='callfunction'>test</a>"
End Sub
Public Sub cfunction()
MsgBox("test saja", MsgBoxStyle.ApplicationModal, ProductName)
'Return 0
End Sub
End Class