Interactivity between placeholders & objectdatasouces

T

TTT

Hello,

1) This code don't work, may some of you explain why?
<asp:Content ContentPlaceHolderID="AAA">
<asp:TextBox ID="QueryTextBox" />
</asp:Content>

<asp:Content ContentPlaceHolderID="BBB">
<asp:ObjectDataSource ID="AdsDataSource" SelectMethod="GetAdsByQuery">
<SelectParameters>
<asp:ControlParameter ControlID="QueryTextBox" Name="searchTerm"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>

Error = cannot find the control QueryTextBox in the parameter "searchTerm".
Why?
It seems that ContentPlaceHolders cannot see their content?

2) Cascade of queries with ObjectDatasources
I would like to execute 2 queries in this order :
- Select Title, AdId, Description, ... From Ads where [some condition]
And then :
- Select Bytes From Photos where AdId = [AdId found in the first query]

How can i do it ? with 2 ObjectDatasources? But they are dependent, how to
excute them in the right order? how would you write it?

THANKS A LOT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top