What Am I doing wrong guys? This is the idea...
Index view
@Html.Partial(\"PartialView\", Model)
Partial view is for reuse some parts of the code in different. When a page is submit then view is reload if you want to avoid page refreshing, you can use ajax.
Code for View
$.ajax({
type: "POST",
url: '@Url.Action("ControllerName", "ActionName")',
contentType: "application/json; charset=utf-8",
data: { data: "yourdata" },
dataType: "json",
success: function(recData) { alert('Success'); },
error: function() { alert('A error'); }
});
Code for Controller
public JsonResult ActionName(string yourdata)
{
return Json(p); \\ where p is you want to return
}