asp.net mvc 2 - MVC2 controller method that can accept unknown number of variables? -
i need work below posted data, or variant thereof. basically, need post variable number of key-value pairs represent question id , answer string.
how write asp.net mvc2 controller method signature accept unknown number of key-value pairs?
attachmentid=8809&question_712=&question_713=&question_714=&question_715=&question_716=&question_717=&question_719=&question_720=&question_721=&question_722=&question_723=&question_724=&question_725=&question_726=&question_727=&question_731=&question_738=&question_739=&question_741=&question_742=&question_743=&question_744=&question_745=&question_746=&question_747=&question_748=
please note in example, there 26 question keys empty values. there may more or less keys , may or may not have value. can reformulate way data sent client, if best solution rethink way sent, i'm open that.
this data formcollection
collects. it's used in automatically generated controllers default. i.e. public actionresult edit(int id, formcollection collection)
Comments
Post a Comment