$(document).ready(function () {
$('#privacyLink').click(function (event) {
event.preventDefault();
var url = $(this).attr('href');
//alert(url);
$('#privacy').load(url);
});
});
Controller 部分:
public ActionResult PrivacyPolicy()
{
if (Request.IsAjaxRequest())
{
return PartialView();
}
return View();
}
Html部分:
@Html.ActionLink("Show the privacy Policy", "PrivacyPolicy", null, new { id = "privacyLink" })