Hi,
I have an object with a property called "name". This object has a sub object that has a property called "name" as well.
Transaction.name
Transaction.TransactionItem
TransactionItem.name
I bind Transaction object to a partial control as usual:
Html.TextBox("name", Model.name)%>
Model is a Transaction object.
And I bind TransactionItems:
<% if (Model.mtTransactionItem != null)
{
foreach (var item in Model.mtTransactionItem)
{ %>
<tr>
<td>
<%= Ajax.ActionLink(item.name, "ShowItem", new { id = item.id }, new AjaxOptions { UpdateTargetId = "dialog-form" })%>
</td>
And when I update the one of the transaction items through an ajax call I pass the entire transaction object to the partial view.
When I debug I check the Model.name
property, and it has a proper value.
But on the page shows the name of TransactionItem
value instead of the name of Transaction
value.
What am I doing wrong?
I have checked this problem in MVC 1.0 and MVC 2.0 framework.