Interactivity between placeholders & objectdatasouces

Discussion in 'ASP .Net Web Controls' started by TTT, Jun 21, 2006.

  1. TTT

    TTT Guest

    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
    TTT, Jun 21, 2006
    #1
    1. Advertising

  2. TTT

    Brock Allen Guest

    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
    >
    Brock Allen, Jun 21, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mark

    word interactivity using aspx

    mark, Jul 15, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    394
  2. Mickey Segal
    Replies:
    0
    Views:
    416
    Mickey Segal
    Sep 14, 2004
  3. zaemin
    Replies:
    0
    Views:
    352
    zaemin
    May 9, 2004
  4. =?Utf-8?B?UEhldGhlcg==?=

    ASP.NET pages hosting WindowsForms control interactivity

    =?Utf-8?B?UEhldGhlcg==?=, May 26, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    329
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 27, 2006
  5. zaemin

    Streamable File Format + Interactivity

    zaemin, May 9, 2004, in forum: C Programming
    Replies:
    2
    Views:
    281
    Stephen Sprunk
    May 9, 2004
Loading...

Share This Page