开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜