Hi Duy,
Thanks for your answer. But, how do i store the CustomerID value in the
hidden field at first place? This value is part of the DataTable that is
being returned by "OrderDetailDataSource"
Thanks
MAQ
>> Hi,
>>
[quoted text clipped - 32 lines]
> // ...
> }
Duy Lam - 11 Dec 2007 16:43 GMT
> Hi Duy,
>
[quoted text clipped - 41 lines]
>> // ...
>> }
It's OK. When you use ObjectDataSource, it's certainly you use Repeater,
DataList or GridView, isn't it ?
And if I'm right, you just capture event DataItemBound and assign value
to your hidden field.
For example:
protected void DataList1_ItemDataBound(object sender,
DataListItemEventArgs e)
{
if( e.Item.ItemType = ListItemType.Item || e.Item.ItemType =
ListItemType.AlternativeItem )
{
Customer c = e.Item.DataItem as Customer;
HiddenField1.Value= c.CustomerId; // Assign ID to hidden field
}
}
Sorry if I reply to you late :-)

Signature
Duy Lam Phuong