web control and javascript

Discussion in 'ASP .Net Web Controls' started by Chris, Feb 22, 2005.

  1. Chris

    Chris Guest

    Hi,

    I want to offload some server processing to the client.

    My idea:
    I have a listbox of items the user has populated. using a text box control
    and a
    button control both of which are server side.

    I want to be able remove items from the listbox using a remove button that
    is client side javascripted.
    When the user clicks on a listitem and presses a remove html button, the item
    is removed. The user might remove multiple items in this manner.

    Then they hit submit, which is a server side button using code-behind.
    Will the listbox object now be out of sync with what is on the webpage which
    has not done a post back in sometime? Will my code behind logic see the
    original listitems before the removal or will it see the smaller list?

    is this possible or are their other solutions?

    thanks

    Chris
     
    Chris, Feb 22, 2005
    #1
    1. Advertising

  2. Hi Chris,

    You might want to take a look at the free DynamicListBox Control here which
    should show you how to use JavaScript and server-side code in a compatible
    way:

    http://www.metabuilders.com/Tools/DynamicListBox.aspx

    "Chris" <> wrote in message
    news:...
    > Hi,
    >
    > I want to offload some server processing to the client.
    >
    > My idea:
    > I have a listbox of items the user has populated. using a text box control
    > and a
    > button control both of which are server side.
    >
    > I want to be able remove items from the listbox using a remove button that
    > is client side javascripted.
    > When the user clicks on a listitem and presses a remove html button, the
    > item
    > is removed. The user might remove multiple items in this manner.
    >
    > Then they hit submit, which is a server side button using code-behind.
    > Will the listbox object now be out of sync with what is on the webpage
    > which
    > has not done a post back in sometime? Will my code behind logic see the
    > original listitems before the removal or will it see the smaller list?
    >
    > is this possible or are their other solutions?
    >
    > thanks
    >
    > Chris
    >
    >
     
    Ken Cox [Microsoft MVP], Feb 22, 2005
    #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. Matthew Louden
    Replies:
    1
    Views:
    6,942
    Scott M.
    Oct 11, 2003
  2. Reny J Joseph Thuthikattu
    Replies:
    1
    Views:
    562
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=
    Dec 30, 2004
  3. shapper
    Replies:
    6
    Views:
    957
    shapper
    Dec 26, 2007
  4. Lisa Calla
    Replies:
    0
    Views:
    279
    Lisa Calla
    Nov 9, 2004
  5. TJ
    Replies:
    4
    Views:
    366
    Steven Cheng[MSFT]
    Apr 7, 2006
Loading...

Share This Page