How to prevent Listbox on WebForm scrolling during postback

Discussion in 'ASP .Net' started by Tom Wild, Aug 21, 2003.

  1. Tom Wild

    Tom Wild Guest

    Hi

    I have a listbox on a webform which has Autopostback set to true. When the
    user selects an item in the listbox and the form reloads, the listbox
    scrolls to put the selected item as high up as possible. Is there any way
    to turn off this behaviour?

    Thanks

    Tom
     
    Tom Wild, Aug 21, 2003
    #1
    1. Advertising

  2. Tom Wild

    Jerry III Guest

    Not use server controls but that's probably not what you want :) You can
    always use OnLoad event (on the select element or on the page's body) and
    scroll the first option to view...

    Jerry

    "Tom Wild" <> wrote in message
    news:...
    > Hi
    >
    > I have a listbox on a webform which has Autopostback set to true. When

    the
    > user selects an item in the listbox and the form reloads, the listbox
    > scrolls to put the selected item as high up as possible. Is there any way
    > to turn off this behaviour?
    >
    > Thanks
    >
    > Tom
    >
    >
     
    Jerry III, Aug 21, 2003
    #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. headware
    Replies:
    0
    Views:
    1,009
    headware
    Oct 15, 2003
  2. =?Utf-8?B?TWFyayBMYXVzZXI=?=

    Prevent menu or hyperlink clicks during postback

    =?Utf-8?B?TWFyayBMYXVzZXI=?=, May 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    546
    =?Utf-8?B?TWFyayBMYXVzZXI=?=
    May 13, 2005
  3. Tina
    Replies:
    2
    Views:
    719
  4. cc cc via .NET 247

    Multiple selection listbox on webform on postback gives problems

    cc cc via .NET 247, Sep 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    258
    cc cc via .NET 247
    Sep 2, 2004
  5. Replies:
    1
    Views:
    178
    Jorge L Matos
    Apr 22, 2005
Loading...

Share This Page