Responding to changes to controls in a Repeater

Discussion in 'ASP .Net Web Controls' started by Kevin Donn, Jun 23, 2006.

  1. Kevin Donn

    Kevin Donn Guest

    I want to mimic the Remove checkbox behavior of the Netflix Queue page. It
    looks like pretty traditional, full-page post and render stuff. I've done
    things like it using frameworks other than ASP.NET, but I haven't found a
    way to leverage the architecture of ASP.NET to do it.

    Here's the nutshell of what Netflix does: your queue page is a listing of
    each movie you've requested. Each item has a Remove checkbox on the line.
    When you click the box no communication with the server happens, Ajax or
    otherwise. You can click all the boxes you want but nothing happens until
    you click "Update Your Queue" which causes a traditional post and re-render
    of the page to happen, and your checked movies will be gone.

    I don't want to do any communication until the user posts the page. What I
    *do* want is to be able to spot the boxes the user has checked when the page
    gets posted. The DataGrid and DataList both just don't support this type of
    behavior, so Repeater seems like the only choice. But Repeater does not
    support instantiating ASP.NET controls (or anything with runat="server") in
    the ItemTemplate. You can, however, have checkboxes in the ItemTemplate, so
    the question becomes, how do you spot changes to these checkboxes when the
    page is posted and map them back to your dataset?

    Thanks,
    Kevin Donn
    Kevin Donn, Jun 23, 2006
    #1
    1. Advertising

  2. Kevin Donn

    Raven Guest

    Raven, Jun 30, 2006
    #2
    1. Advertising

  3. Kevin Donn

    Guest

    Kevin:
    I do a similar thing using XML and it works well for me. I use a gridview for this but a datagrid works just as well. I build an XML document with a list of all the items to remove. Then in SQL Server, I delete all the selected items from the table and rebind the gridview.

    This uses one server trip for the delete and one for the rebinding gridview.
    Email me and I can send you the code.

    Sincerely,
    Jerode
    , Jul 26, 2006
    #3
    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?S2V2aW4gSm9uZXM=?=

    User controls not responding... please help

    =?Utf-8?B?S2V2aW4gSm9uZXM=?=, Apr 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    312
    =?Utf-8?B?S2V2aW4gSm9uZXM=?=
    Apr 22, 2004
  2. Andy B
    Replies:
    1
    Views:
    980
    bruce barker
    Nov 15, 2008
  3. colter k?ntz via .NET 247

    responding to events raised by controls in a webcontrol

    colter k?ntz via .NET 247, Jun 15, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    131
    Robert
    Jun 15, 2004
  4. JezB
    Replies:
    2
    Views:
    106
    Robert Koritnik
    Jun 21, 2004
  5. Ben Katz

    Array object responding to changes

    Ben Katz, Sep 30, 2003, in forum: Javascript
    Replies:
    1
    Views:
    71
    Douglas Crockford
    Sep 30, 2003
Loading...

Share This Page