ASP.NET MVC ViewResult vs PartialViewResult

PartialViewResult is used to render a partialview (fx. just a user control). This is pretty nifty for AJAX stuff, i.e.

<script type="text/javascript">
    $.get(
        "/MyController/MyAction",
        null,
        function (data) { $("#target").html(data) }
     );
</script>

and action

public ActionResult MyAction() 
{
    return PartialView("SomeView");
}

where SomeView is a MVC User Control, e.g.:

<div>
   <%= DateTime.Now.ToString() %>
</div>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)