This is how my web page looks like:

PosisionDataView is a web user control, which contains textboxes for product name and note plus some additional controls.
QuantityView is also a web user control, which contains textboxes for quantity and price plus some additional controls.
The user can dynamically add QuantityView’s and PositionView’s to the page. This happens this way:
- The user clicks the ButtonAddQuantityView or ButtonAddPositionView
- jquery’s ajax method is called, which calls a method on my web service, which returns QuantityView or PositionView in html format
- the received control is appended to the QuantityPlaceholder or to PositionsPlaceholder
This all works pretty smooth, but what is the best method to parse this mess after postback? For example the QuantityView contains the textbox txtQuantity and in Request.Form collection I get these values for quantities:
- ctl00$ContentPlaceHolder1$PositionView$ctl00$QuantityView$ctl00$txtQuantity: 1
- ctl00$txtQuantity: 2,4
- ctl00$QuantityView$ctl00$txtQuantity: 3
In reallity position 1 contains quantities 1 and 2, and position 2 contains quantities 3 and 4, but the Request.Form is a mess…
Thought i could post comments!
Anyway, are you sure form variable names are not repeating? Especially ctl00$txtQuantity.
If txtQuantity names could be made slightly unique like txtPositionViewQuantity or txtQuantityViewQuantity (for each sub section), you could access those control’s data via jquery and create for example a JSON object. This will keep your server round trips light.