Last post Feb 21, 2011 05:23 PM by vishalmarneni
Feb 21, 2011 12:28 PM|vishalmarneni|LINK
Iam tyring to post back my screen on a button (submit) click. I am trying to develop the view using Razor syntax.
I've added the following code to create a form tag and postback the cshtml file.
Iam unable to close the form using "@Html.EndForm();"
the endform command gives me "Error 1 Cannot implicitly convert type 'void' to 'object' ...." error.
If I comment out the endform line, my screen works(no build errors) but I end up getting
as my very first line on the screen when I run the application.
pretty new to MVC, so any help would be appreciated.
Feb 21, 2011 12:38 PM|MikeSW|LINK
@using(Html.BeginForm("Action", "ControllerName", FormMethod.Post))
Feb 21, 2011 05:23 PM|vishalmarneni|LINK
Thanks! That worked