in asp.net mvc i confront an crude form blunder digest page repremand typed object
i am building an concentration controlling mvc preview 5. i have used typed views.
after sourroundings debug="false", i have found i am receiving errors form:
"the denote vigilant upheld the
collection type
'blah.models.useradmin.indexdata' but
collection requires denote item
type
'blah.models.organisationadmin.indexdata'".
i errors debug on.
it looks mvc horizon caching views perspective name. i have twin actions views same name (albeit opposite namespaces), i wholly movement executed initial successful, second always law error.
for example, i have useradmincontroller an organisationadmincontroller.
both have an index action.
both perspective called index.aspx (each contained controllers perspective folder; views/useradmin/index.aspx views/organisationadmin.index.aspx).
both views typed models called indexdata (blah.models.useradmin.indexdata blah.models.organisationadmin.indexdata)
if i revisit organisationadmin/index first, i any unbroken try perspective useradmin/index law blunder summary shown above.
conversely, i revisit useradmin/index initial (after restarting application), i navigating organisationadmin/index causes an homogeneous blunder (with forms proceed around).
i renamed views useradminindex.aspx seemed repair problem. however, doesnt feel should an issue. definitely mvc horizon support further named views? i am blank something?
any assistance gratefully received.
sandy
please note, i have seen doubt "in asp.net mvc i confront an crude form blunder digest user control repremand typed object". i am opposed identical problem, nonetheless i am controlling renderusercontrol().
the smoke-stack trace:
invalidoperationexception: denote vigilant upheld collection form 'blah.models.roleadmin.indexdata' nonetheless collection requires denote vigilant form 'blah.models.useradmin.indexdata'.]
system.web.mvc.viewdatadictionary`1.setmodel(object value) +231
system.web.mvc.viewdatadictionary..ctor(viewdatadictionary viewdatadictionary) +99
system.web.mvc.viewpage`1.setviewdata(viewdatadictionary viewdata) +60
system.web.mvc.webformview.renderviewpage(viewcontext context, viewpage page) +64
system.web.mvc.webformview.render(viewcontext viewcontext, textwriter writer) +85
system.web.mvc.viewresult.executeresult(controllercontext context) +206
system.web.mvc.controlleractioninvoker.invokeactionresult(actionresult actionresult) +19
system.web.mvc.<>c__displayclass12.<invokeactionresultwithfilters>b__f() +18
system.web.mvc.controlleractioninvoker.invokeactionresultfilter(iresultfilter filter, resultexecutingcontext precontext, func`1 continuation) +257
system.web.mvc.<>c__displayclass14.<invokeactionresultwithfilters>b__11() +20
system.web.mvc.controlleractioninvoker.invokeactionresultfilter(iresultfilter filter, resultexecutingcontext precontext, func`1 continuation) +257
system.web.mvc.<>c__displayclass14.<invokeactionresultwithfilters>b__11() +20
system.web.mvc.controlleractioninvoker.invokeactionresultwithfilters(actionresult actionresult, ilist`1 filters) +188
system.web.mvc.controlleractioninvoker.invokeaction(controllercontext controllercontext, twine actionname) +386
system.web.mvc.controller.executecore() +112
system.web.mvc.controllerbase.execute(requestcontext requestcontext) +23
system.web.mvc.controllerbase.system.web.mvc.icontroller.execute(requestcontext requestcontext) +7
system.web.mvc.mvchandler.processrequest(httpcontextbase httpcontext) +107
system.web.mvc.mvchandler.processrequest(httpcontext httpcontext) +39
system.web.mvc.mvchandler.system.web.ihttphandler.processrequest(httpcontext httpcontext) +7
system.web.callhandlerexecutionstep.system.web.httpapplication.iexecutionstep.execute() +181
system.web.httpapplication.executestep(iexecutionstep step, boolean& completedsynchronously) +75
Comments
Post a Comment