How can I access form elements when using an ASP.NET MVC Ajax form?

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-04-12T16:57:41Z Indexed on 2010/04/12 17:03 UTC
Read the original article Hit count: 234

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about AJAX