title: ASP.NET MVC model binding with knockout.js
body: <p>I'd like to do some server-side model binding with form elements created with knockout.js, using some custom name attributes attached to each dynamically created DOM element. I know I can use AJAX but native HTML form posts would work out better for me right now. The js file looks like this:</p>
  
  <pre><code>function MyModel(){ 
     var self = this;
     var count = 0;
     var insertItem = function(eleToInsertAfter){
         var index = self.items.indexOf(eleToInsertAfter),
             notFound = -1;
  
         var item = {
             type: '',
             description: ''
         };
  
         if(index == notFound){
             self.items.push(item); // there are no items yet, just push this item
         } else {
             self.items.spilce(++index, 0, item); // insert after the 'eleToInsertAfter' index
         }
         ++count;
     }
  
     self.title = ko.observable('');
     self.items = ko.observableArray([]);
  
     self.insert = function(eleToInsertAfter){
         insertItem(eleToInsertAfter);
     }
  
     // insert the first item
     self.insert({
             type: '',
             description: ''
         });
  }
     ko.applyBindings(new MyModel());
  </code></pre>
  
  <p>and the html markup looks like this:</p>
  
  <pre><code>&lt;form method="post" action="/controller/action/"&gt;
       &lt;input type="text" data-bind="value: title" /&gt;
       &lt;ol data-bind="foreach: items"&gt;
            &lt;li&gt; 
                 &lt;!--I'd like to achieve this effect *name="[0].type"* and *name="[0].description"*, and so on --&gt;
                 &lt;input type="text" data-bind="value: type, *attr: {name = '['+$index+'].type'}*" /&gt;
                 &lt;input type="text" data-bind="value: description, *attr: {name = '['+$index+'].description'}*" /&gt;&lt;br /&gt;
                 &lt;button data-bind="click: $root.insert"&gt;Add Item&lt;/button&gt;
            &lt;/li&gt;
       &lt;/ol&gt;
       &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>If I can achieve the above effect then the MVC controller action could look like this:</p>
  
  <pre><code>public ActionResult action(MyModelCS model){
      // do something
  
      return View();
  }
  </code></pre>
  
  <p>and MyModelCS would look like this:</p>
  
  <pre><code>public class MyModelCS {
      public string title { get; set; }
      public string[] type { get; set; }
      public string[] description { get; set; }
  }
  </code></pre>
  
  <p>I've implemented a similar version to this using just jQuery but now I'm required to do a similar version using Knockout.js instead.  I'm new to Knockout but I searched the documentation to find some help without any luck... please help...</p>