From: Lubomir on 14 Feb 2010 15:55 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
|
Pages: 1 Prev: Work at Home- Earn $4,000 With Email Reading Jobs Next: Run subroutine using UpdatePanel |