I am adding input elements in a view, dynamically, using 开发者_Go百科JavaScript. But I am unable to find those inputs in my ActionResult's FormCollection parameter...:
public ActionResult SomeAction(FormCollection fc)
I am able to find static input elements in the View. And using FireBug, I can see that the inputs are inside of the form element, in the DOM, and are not floating around somewhere random.
How can I access these inputs elements?
It is possible you're doing something to keep them from getting up to the server.
- are you changing the form's Action on the client? This causes the form values to not be posted to the server (as a browser security precaution).
- Remember to have a name attribute on the added elements.
- You're really posting the form, and not just refreshing?
Are the values available in the Request object?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论