Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Interactivity between placeholders & objectdatasouces

Reply
Thread Tools

Interactivity between placeholders & objectdatasouces

 
 
TTT
Guest
Posts: n/a
 
      06-21-2006
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


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      06-21-2006
Mark the QueryTextBox with runat=server

-Brock
http://staff.develop.com/ballen


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



 
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
ASP.NET pages hosting WindowsForms control interactivity =?Utf-8?B?UEhldGhlcg==?= ASP .Net 1 05-26-2006 11:13 PM
Tablets mean giving up some Java interactivity? Mickey Segal Java 0 09-14-2004 01:21 PM
word interactivity using aspx mark ASP .Net 4 07-21-2004 10:58 AM
Streamable File Format + Interactivity zaemin C Programming 2 05-09-2004 01:37 PM
Streamable File Format + Interactivity zaemin C++ 0 05-09-2004 05:34 AM



Advertisments