HOW? Controller return nothing/current view
来源:互联网 发布:paxos算法 活锁 编辑:程序博客网 时间:2024/06/01 07:41
http://stackoverflow.com/questions/579390/how-controller-return-nothing-current-view
You can return an EmptyResult if you want it to do nothing...
return new EmptyResult();
If you're using the AjaxHelper you can avoid the update by supplying an unsuccessful status code (e.g. 404 or whatever is most appropriate), that'll stop it replacing your div as the javascript in MicrosoftMvcAjax.js explicitly checks for a successful response before updating any elements:-
this.ControllerContext.HttpContext.Response.StatusCode = 404;return new EmptyResult();
Ultimately the best way to avoid it is to design the partial view so it avoids the problem in the first place (like you mention yourself).
0 0
- HOW? Controller return nothing/current view
- Controller return view()
- How to write view controller programmatically
- How does View Controller Containment work in iOS 5?
- return View()
- return View
- view controller
- View Controller
- @Controller return "redirect:解答
- PostgreSQL View current log
- Applications Programming in Smalltalk-80(TM):How to use Model-View-Controller (MVC)
- How to pass List from Controller to View in MVC 3.
- Part 4 - How does a controller find a view in mvc
- presenting view controller Vs presented view controller
- 【View Controller】Presenting a view controller programmatically
- Nothing
- nothing
- NOTHING
- Can we call the Method of a controller from another controller in asp.net MVC?
- Lambda Expression of Select * from TableName
- Subsets
- Can I have fixed typed ArrayList in C#, just like C++?
- Can a DateTime be null?
- HOW? Controller return nothing/current view
- OSX: 10.10 Yosemite Developer Preview 2安装的一个注意事项
- 树和二叉树
- 增加mysql的最大连接数
- PHP判断表单复选框选中状态的例子
- 1.普通工厂模式
- java实现页面访问量统计的实例
- 关于Memcache的连接
- LeetCode 52 Maximum Subarray