1 DataSource to Man DataBound Controls

Discussion in 'ASP .Net Building Controls' started by jazzMan007, Jan 12, 2006.

  1. jazzMan007

    jazzMan007 Guest

    Hey All -

    I'm working on a web application that is the UI front end to our
    product. On one particular screen, the user is viewing a single result,
    but only some parts are visible. I've created a datasource control that
    fetches the data from the server, and databound controls that use that
    data source. On the page there could be any number of data bound
    controls bound to one data source. For the data source to know what
    data to fetch, it has a 'Selecting' event that is wired into by each
    control. In the handler of that event, it sets its request into the
    Selecting event args and returns them.

    I've gotten this setup working pretty well. It only selects when the
    data changes (ie. the user navigates records) and not on postbacks, and
    when the datasourceview performs the select, all the controls are
    hooked in properly to submit their request for data fetching.

    The problem I'm running into is that the datasource is selecting once
    for every control on the page! Each individual select ends up running
    the same request since the hooks into the controls for their requests
    work fine...it just happens many times!

    Is this intended behaviour of the DataSource/DataBound controls? If I
    use a SqlDataSource, and have, say, a gridview and detailview going to
    the same datasource, is it going to select twice?

    Any ideas?

    Thanks in advance,
    John
    jazzMan007, Jan 12, 2006
    #1
    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. =?Utf-8?B?YW55ZW9uZQ==?=
    Replies:
    0
    Views:
    538
    =?Utf-8?B?YW55ZW9uZQ==?=
    Dec 19, 2005
  2. Mike Grace
    Replies:
    1
    Views:
    1,912
    Brock Allen
    May 12, 2006
  3. rodchar
    Replies:
    0
    Views:
    376
    rodchar
    Nov 26, 2007
  4. Manu
    Replies:
    0
    Views:
    157
  5. Jaap Karssenberg

    conflict between man perlipc and man perlfunc !?

    Jaap Karssenberg, Jan 9, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    138
    Jaap Karssenberg
    Jan 9, 2004
Loading...

Share This Page