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
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