c# - How to link a windows form in one project to a button in another project using MVC3 -


in program have registration page user enters details register system. on page have button when selected should open windows form located on project, when select button nothing happening.

the code behind windows form application:

 public generatetoken()     {         initializecomponent();     }      public void main()     {         application.run(generatetoken.activeform);     } 

the above code found in project on own. in project code controller calls windows form:

 public actionresult generatetoken()     {         new tokengenerator.generatetoken().main();         return redirecttoaction("registerpage");     } 

the code in view button located button is:

    <input id="gentoken" type="button" value="generatetoken" onclick = "generatetoken" /> 

is there doing wrong regarding button or way trying link them wrong?

as insist on way, have create communication channel between these 2 apps. can use modern technologies purpose such named pipes, .net remoting or wcf hosted on iis (better one). if choose named pipes or .net remoting, have create windows service project , use server application. shown in sample, create host object , register channel in windows service solution. have define method in hosted class runner of windows application. noticed have run process not way did in code. web app must call method server hosted object cause windows app run. how start process explained here. let me know if understand do.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -