Original link:
http://www.cnblogs.com/andrewhappy/p/5437280.html
- Front page:
< Div ID = "placeholder">
</div>
.ajax $ ({
URL: ' @ Url.Action ( " sub-method ")' // Call sub-method (Child Action)
type: ' the POST ',
Data: ({Parameter name: value}) // Note parenthesis
dataType: 'html', // returns html format
Success: function (Result) {$ ( ' # placeholder' ) .html (Result);}
- Backend Control:
[HttpPost]
public ActionResult sub-method ( String parameter name)
{...}
- Backend Child View:
< P > Why Why < / P >
Reproduced in: https: //www.cnblogs.com/andrewhappy/p/5437280.html