asp.net - MVC + Forms: Post error -
i getting following error whenever try simple form post in mvc website.
either binaryread, form, files, or inputstream accessed before internal storage filled caller of httprequest.getbufferedinputstream.
description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.
exception details: system.invalidoperationexception: either binaryread, form, files, or inputstream accessed before internal storage filled caller of httprequest.getbufferedinputstream.

my sample form , actions pretty basic...
@using (html.beginform("create", "form")) { <div class="row action"> <div class="row"> first name: <input type="text" name="fname"><br> last name: <input type="text" name="lname"><br> </div> <input type="submit" id="save" class="btn" value="save"/> <input type="button" id="cancel" class="btn" value="cancel"/> </div> } and controller action more basic...
[httppost] public actionresult create(formcollection collection) { try { // todo: add insert logic here return redirecttoaction("index"); } catch { return view(); } }
please share route.config file might solving problem. in case try removing perimeters html.beginform() remove name of action , controller. mvc has strong naming systems because of don't need add info.
if above doesn't solve issue share route file.
Comments
Post a Comment