开发者

function should not change current view

开发者 https://www.devze.com 2023-03-10 14:39 出处:网络
I have a form that submits 开发者_JAVA技巧to a function and returns a particular view when certain values are submitted.

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号