function should not change current view
I have a form that submits 开发者_JAVA技巧to a function and returns a particular view when certain values are submitted. However I require it to return nothing when no values are matched, or if values are empty. At the moment, when this happens I am redirected to a blank page. I require a function to return "something", so the view is not changed. Returning 'nothing' or 'emptyresult', still yields a blank page.
regards, Andrew.
You have to return a new view to the browser. If you want to display the same view again as before, then you should redirect to the action which rendered the previous view (RedirectToAction
).
精彩评论