From: Lubomir on
Hi, I have a ListView control and <InserItemTemplate> template.

<InsertItemTemplate>
<asp:Table runat =…..>
<asp:TableRow runat …>
<asp:TextBox ID=”someTextBox” text='<%# Bind(“AAA”) %> runat =
…/>
</asp:TableRow>
</asp:Table>
</InsertItemTemplate>

The ObjectDataSource is bound to the ListView:
<asp:ObjectDataSource ID=”mydatasource” runat…>
<InsertParameters>
<asp:ControlParameter Name=”ctrlPrm” ControlId=” someTextBox”
PropertyName=”Text” … />
</InsertParameters>
</asp:ObjectDataSource>


When I run the code and try to execute Insert command, I get exception, that
the control “someTextBox” could not be found.

On the net I found opinions that ObjectDataSource can not find the control
because it has a different ID during the runtime. However, this renders
ObjectDataSource to be not very usefull.

How should I pass the parameter “ctrlPrm” to the ObjectDataSource (Insert
command) ?
I know there has been made some changes in the ListViewControl in .NET 4.
Will be this behaviour changed?

Thanks,
Lubomir