Calling c# from javascript in html page

anderton

Member
Joined
Jun 26, 2003
Messages
7
Hi !

I have a windows form where I have hosted HTML content (via a WebBrowser, AxSHDocVw and MSHTML). I have inserted a html-page index.htm

I know I can catch events from the html page in the form but that is not what I am looking for.

When running javascript code in the html page I would like to use methods in c# in the form that holds the html page.

Is this possible ? if possible please provide an example.

Thanks

Anderton
 
C# runs on the server-side while javascript runs on the client-side. The only way javascript can "interact" w/ C# is to postback to the server.
 
Hi

C# doesnt run server side, it runs ind the windows form and the html page is inserted in the windows form using WebBrowser, AxSHDocVw and MSHTML.

I need a way to call a method in the form that holds the html page.


Anderton
 
In that case, the only touchpoint for the hosted web app and the C# Windows Form app is thru the events exposed by the control. But a direct call from the web app into a method of the WinForm, I dont think so.
 
Back
Top