开发者

action result to use with ajax.beginform to avoid duplicating elements

开发者 https://www.devze.com 2023-03-05 21:47 出处:网络
开发者_Go百科I am using Ajax.BeginForm to update a div with a list of users, it calls action result to insert a new name into database and then update the list. To do that, i am returning a partial vi
开发者_Go百科

I am using Ajax.BeginForm to update a div with a list of users, it calls action result to insert a new name into database and then update the list. To do that, i am returning a partial view, but i am getting some strange results. The functionality is fine, and it all works, but the resulting partial view is inserted into a part of the old partial view. to be specific, a fieldset.

My question is, how to use ajax to implement simple create and delete actions to achieve a dynamic page? What Actions should i use in Controller to get the best and simplest results.

Thank you.

0

精彩评论

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