I’m developing a web site as well as windows application and i’m going to use same web page for windows form application as well as for web site.
so i want to call the windows form control after clicking on the link which is placed on the web page. And i want to show the windows form control as a pop up form.
How to do this? Or provide some document related to this issue.
Assuming you mean that within your WinForms application you’re hosting an instance of the
WebBrowserclass, you can provide an object to itsObjectForScriptingproperty. that provides a method to call to trigger your WinForms code. For example:Then, in your page:
There’s the obvious caveat that you’ll need to have code in your web page that checks to ensure that
window.external.DoSomethingis actually there, so likely youronclick(in this example) would call a helper method that either calls into WinForms, or does whatever needs doing in the event that the page isn’t being hosted inside your application.