-1

I am currently finding problem with my submit button.

I have a page (say Page A) and within this "Page A", I called a PartialView using the RenderAction("ActionName", "Controller", "Parameters").

The PartialView displays correctly. There is a BeginForm("Action", "Controller", null, FormMethod.Post, new { enctype = "multipart/form-data"}) and a Submit button in this "Page A" and when I click on the button, the formpost method called the RenderAction() instead of the FormPost method.

Please help me solve this challenge since my search for solution on this forum and elsewhere is not yielding any results.

bafrimpong
  • 99
  • 11

1 Answers1

0

You must use Ajax.BeginForm()

If you are using "multipart/form-data" that is mean you are uploading a file with your form.

You can check this out.

Ajax.BeginForm in MVC to upload files

Community
  • 1
  • 1
Can Ürek
  • 641
  • 12
  • 24
  • Thanks a lot for your response brother. I am not trying to upload a file. What is happening is that when I comment on the RenderAction, I am able to post the form content to the controller even with the same form without change. – bafrimpong Apr 18 '16 at 13:30