MVC 2 JSON equivalent to FormCollection
Is there a JSON equivalent f开发者_运维百科or FormCollection form as a POST action parameter? I have a dynamically generated number of fields that I need to post back via JSON.
You can simply serialize a NameValueCollection from your FormCollection, using the new NameValueCollection(NameValueCollection)
constructor. That is all a FormCollection is, after all.
精彩评论