views:

31

answers:

1

I've got an ajax form in an MVC 2 application. I cannot find the proper way to access the form elements within the Ajax form decleration. I can access the name of the elements with Request.Form.Keys but I can't access the actual values. I've read numerous examples of posting forms with jQuery but my form has elements created dynamically based on route values (sometimes it could be 2 text boxes sometimes 10, given unique names like so: <%= Html.TextBox("Evaluation"+Model.EvaluationId.ToString())) so I couldn't find a way to make that work with jQuery.

Is there another way that I for elements can be accessed?

+2  A: 

This same question was asked not two hours ago: http://stackoverflow.com/questions/2622112/add-controls-dynamically-on-button-click-in-asp-net-mvc/2622164#2622164

That OP's accepted answer: http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/

Dave Swersky
Thanks, I had arrived at SO several times last night, guess I should have checked again this morning.
Patrick
"StackOverflow moves pretty fast, if you don't slow down once in a while, you might miss it." -Ferris Bueller (paraphrasing ;)
Dave Swersky