asp.net mvc2 ajax.actionlink is not working refresh problem
has someone make ajax.actionlink for delete to work properly.After deleting the record successfully at the end it is not refreshing the page properly. the page refresh is my problem. i have defined the updatetarget id and returning view(model) from my controller but it is returning the master page with it.
So the thing is that i am having a page with a page.I have used redirect as well which is not refreshing,
<%= Ajax.ActionLink("Delete", "Delete", new { id = item.int_OrganizationGroupId }, new AjaxOptions { UpdateTargetId = "abc", HttpMethod = "Post", Confirm = "Delete Group with Organization Group ID:" + item.int_OrganizationGroupId + " Or开发者_开发知识库ganization Group Name:" + item.vcr_OrganizationGroupName, OnSuccess = "handleSuccess" })%>|
abc is the id of the table
From controller
View("ManageGroup,Model);
To use AJAX returns on models and views, you need to create a partial view and return that instead of a full view which will include your master page, etc.
Public Function AjaxView() as ActionResult
Return PartialView("NameOfYourPartialView", ItemsToReturn)
End Function
精彩评论