asp.net mvc - ViewResult class result not work when i submit a form method post for redirect to another view -
when sumit form want redirect page viewresult class. filter code :
[validatespamfilter(duration: 60, isaddress: false, keeprequestincache: true)] // httppost method submit form . can add comment method . [system.web.mvc.httppost] public actionresult addcomment(commentadddto comments)
and
filtercontext.result = new viewresult { viewname = "~/error/index" };
this work actionresutland partialviewresult get methods. want uses actionresutland post method . because submit form method , below error
'~/error/index' or master not found or no view engine supports searched locations. following locations searched:\r\n~/error/index"
Comments
Post a Comment