Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ListView::InsertItemTemplate / ObjectDataSource

Reply
Thread Tools

ListView::InsertItemTemplate / ObjectDataSource

 
 
Lubomir
Guest
Posts: n/a
 
      02-14-2010
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ObjectDataSource method as another ObjectDataSource David Thielen ASP .Net Web Controls 3 03-23-2006 01:50 AM
HELP !!! ObjectDataSource Delete Parameter Problem ASP.NET 2.0 Microsoft news ASP .Net 2 03-16-2005 05:37 PM
ObjectDataSource =?Utf-8?B?RG9u?= ASP .Net 0 11-22-2004 08:21 PM
Arrrrg !!!! ObjectDataSource Issues WertmanTheMad ASP .Net 2 10-08-2004 04:10 PM
objectDataSource WertmanTheMad ASP .Net 0 09-15-2004 03:37 AM



Advertisments