日期:2014-05-17 浏览次数:20507 次
//Ajax
public ActionResult DailyDeal()
{
var album = getDailDeal();
return PartialView("_DailDeal",album);
}
private Album getDailDeal()
{
return db.Albums.First();
}
<div id="dailydeal">
@Ajax.ActionLink("Click","DailyDeal","AlbumInfo",
new AjaxOptions(){
UpdateTargetId = "dailydeal",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET"
})
</div>