c# - Adding HttpPost getting error 'The Resource Cannot Be Found' in MVC -
i'm getting error server error in '/' application.
the resource cannot found.
description: http 404. resource looking (or 1 of dependencies) have been removed, had name changed, or temporarily unavailable. please review following url , make sure spelled correctly.
requested url: /clientedit/clientedit/1104
version information: microsoft .net framework version:4.0.30319; asp.net version:4.0.30319.272
when add httppost attribute controller. i've looked , corrected code posted(no pun intended) answers nothing i've tried works. here's controller header:
[httppost] public actionresult clientedit(int id,formcollection formcollection)
i added httppost can populate formcollection object. other posts, causes error. removing solves issue formcollection doesn't populate key/value pairs.
my view has form tag's method set post solved other dev's issues doesn't solve mine. tried adding 'name=' properties textbox controls 'id=' doesn't work either.
<body> <form method="post" action="1104" id="form1">
i don't know else try.
you need provide view renders <form>
well. action
on show html looks wrong me. think action="/controller/clientedit"
.
Comments
Post a Comment