开发者

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

开发者 https://www.devze.com 2022-12-26 07:24 出处:网络
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开发者_StackOverflow社区 of the elements

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开发者_StackOverflow社区 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?


This same question was asked not two hours ago: Add controls dynamically on button click in asp.net mvc

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

0

精彩评论

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