15
When I click on Ajax.ActionLink it is calling my controller twice.
<td id = @tdTag>
@Ajax.ActionLink("LL-" + item.getProjectAbbreviation(item.projectID.Value) + "-" + item.prjLessonID, "Details",
new { id = item.lessonID },
new AjaxOptions
{
HttpMethod = "POST",
UpdateTargetId = "details",
InsertionMode = InsertionMode.InsertAfter ,
OnSuccess = "showDetails()"
})
My Controller looks like this...
public ActionResult Details(int id)
{
using (LLDataContext storeDB = new LLDataContext())
{
var lesson = (from l in storeDB.lessons
where l.lessonID == id
select l).SingleOrDefault();
return PartialView(lesson);
}
}