views:

317

answers:

1

Hello there,

After reading and installing the application on the post at "Editing a variable-length list of items in ASP.NET MVC by Steve, I find it really useful. On the other hand, there was something missing on the "Add another item" ajax link because it does not save the state of the non-submitted records. When I click on the link and type a new "Gift name", and after clicking again the same "Add another item" link the data that I already typed get lost. I would like to store(not lose) the data that was typed to the textboxes on each ajax call("Add another item") and be able to save all of them on the submit call.

Actually, I tried to reload the already typed but not submitted ones from a variable; however, I cannot be able to access the form data that holds the edited but not submitted records in it.

Any help/idea would be appreciated, sarp

A: 

http://www.codeplex.com/aspnet/WorkItem/View.aspx?WorkItemId=2893

Description If you use Ajax.ActionLink() to insert additional content at the top or bottom of an element, it also resets the state of any input controls in that element, losing the user's changes.

It sounds like a bug.

The code as provided should save multiple added items, but when you click 'add another item' it resets the inputs value. For existing items, this would be the server provided values (any user changes are lost) and for other new items it would be an empty string.

See if your experience matches the behavior from the bug link and if using IE 7 works as intended.

eyston
Yes huey,It is a bug on firefox and chrome, but it works on IE 7 without any problem, thanks.