In my program I have a registration page where a user enters all his details to register to the system. On this page I have a button that when selected should open up a windows form that is located on another project, however when I select this button nothing is happening.
The code behind the windows form application:
public GenerateToken()
{
InitializeComponent();
}
public void Main()
{
Application.Run(GenerateToken.ActiveForm);
}
The above code is found in a project on its own. In another project this is the code for the controller that calls this windows form:
public ActionResult generateToken()
{
new TokenGenerator.GenerateToken().Main();
return RedirectToAction("RegisterPage");
}
The code in the view where the button is located for this button is:
<input id="GenToken" type="button" value="generateToken" onclick = "generateToken" />
Is there something that I am doing wrong regarding the button or is the way that I am trying to link them together wrong?