I have the following view:
@model ViewModels.Shared.BaseViewModel
<div class="rep_tb0">
<div class="rep_tr0">
<div class="rep_td0">@Html.LabelFor(model => Model.Link.Position)</div>
<div class="rep_td0">@Html.LabelFor(model => Model.Link.Title)</div>
</div>
@for (var i = 0; i < Model.AdminDetails.Count; i++)
{
var qs = "&ac=" + Model.Meta.AccountID +
"&me=" + Model.AdminDetails[i].RowKey;
<div class="rep_tr0">
<div class="rep_td0">
@Html.TextBox(("Position_" + @i), Model.AdminDetails[i].Position, new { size = 2 })
</div>
<div class="rep_td0">@Model.AdminDetails[i].Title</div>
</div>
}
</div>
Populated by this controller action:
public ActionResult Detail(string ac, string me)
{
vm.AdminDetails = _link.Detail(ac + me).ToList();
return View(vm);
}
I would like to use Ajax, jQuery and HTML.Renderpartial as there are times when I need to request a refresh of the data for example when I change the value of position.
I am totally new to the idea of doing this. I found links that help me but mostly it was about Ajax with earlier versions of MVC and not so much about MVC3. Can someone give me some pointers. I am not looking for code. Just a few line example of how I could go about doing the coding in my action method, how I should call the Ajax etc.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…