2
Answers

MVC - Send Info From Modal Popup to Controller

Tay Rich

Tay Rich

4y
2.1k
1
Hi so I am new to MVC. 
 
So in my View I have a button that brings up a modal, in that model I have a textbox. I would like that data from the textbox to be sent to the controller via the submit button in the modal. That data must then be sent into a .txt file via the controller. 
 
Using the @using (Html.BeginForm("Controller", "Function", FormMethod.Post)) method. 
 
If I use a textbox directly from the view and send the data to the controller it works, but it just won't work from the modal.
 
Also trying to avoid using AJAX as I have never used it before. 
 
Please help!
 
Thanks so much  
  
Answers (2)