Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Once you have added something like this first answerthis first answer into your project to apply name prefixes to your partial views, you can post them back as is.

On a side note

If you get into variable length lists within those partial views, its no longer that easy.

  1. You would want to send prefix to the controller to properly add new htmlNamePrefixes to the new partial view.
  2. To make posting easy in those situations I've created this helper $.fn()

The helper function will re-base missing / added name indexes back in order for each of the partial views within a parenting form (even if the partial views , had partial views) for the post back to go through as it should. (apologize for the early stage and messed up commenting).

Once you have added something like this first answer into your project to apply name prefixes to your partial views, you can post them back as is.

On a side note

If you get into variable length lists within those partial views, its no longer that easy.

  1. You would want to send prefix to the controller to properly add new htmlNamePrefixes to the new partial view.
  2. To make posting easy in those situations I've created this helper $.fn()

The helper function will re-base missing / added name indexes back in order for each of the partial views within a parenting form (even if the partial views , had partial views) for the post back to go through as it should. (apologize for the early stage and messed up commenting).

Once you have added something like this first answer into your project to apply name prefixes to your partial views, you can post them back as is.

On a side note

If you get into variable length lists within those partial views, its no longer that easy.

  1. You would want to send prefix to the controller to properly add new htmlNamePrefixes to the new partial view.
  2. To make posting easy in those situations I've created this helper $.fn()

The helper function will re-base missing / added name indexes back in order for each of the partial views within a parenting form (even if the partial views , had partial views) for the post back to go through as it should. (apologize for the early stage and messed up commenting).

Source Link
Pakk
  • 859
  • 2
  • 19
  • 39

Once you have added something like this first answer into your project to apply name prefixes to your partial views, you can post them back as is.

On a side note

If you get into variable length lists within those partial views, its no longer that easy.

  1. You would want to send prefix to the controller to properly add new htmlNamePrefixes to the new partial view.
  2. To make posting easy in those situations I've created this helper $.fn()

The helper function will re-base missing / added name indexes back in order for each of the partial views within a parenting form (even if the partial views , had partial views) for the post back to go through as it should. (apologize for the early stage and messed up commenting).