Re: listbox scrolling to top on postback

Discussion in 'ASP .Net' started by headware, Oct 15, 2003.

  1. headware

    headware Guest

    Nicole,

    Unless I'm misunderstanding what you mean, I tried that and it didn't
    work. I did something like this:

    string text = "sometext" + "   ";

    However, ASP.NET makes an attemp to actually display the string
    "sometext   " so it ends up translating this into the
    following HTML:

    sometext   

    Is there any way to turn this feature off?

    Thanks,
    Dave

    "Nicole Calinoiu" <> wrote in message news:<>...
    > Dave,
    >
    > Try using &nbsp; instead of a literal space character.
    >
    > HTH,
    > Nicole
    >
    >
    > "headware" <> wrote in message
    > news:...
    > > Thank you, this is just what I was looking for. Maybe you can help me
    > > with another issue I'm having with the listbox control. I want to be
    > > able to support easy multiple selection which is why I'm using the
    > > listbox, but I also need to be able to support formatting the text
    > > into columns within the listbox. I tried to the pad the entries with
    > > spaces but asp.net strips out all of the extra spaces so you only end
    > > up with one space in between columns. The only way I can get it to
    > > format correctly is to put some non-whitespace character in as
    > > padding. I'm using periods right now and it's pretty ugly. How can I
    > > get columns into a listbox?
    > >
    > > Thanks,
    > > Dave
    > >
    > >
    > > "Nicole Calinoiu" <> wrote in message

    > news:<#>...
    > > > Dave,
    > > >
    > > > See the following thread for a workaround:
    > > >

    > http://groups.google.com/groups?threadm=
    > > >
    > > > HTH,
    > > > Nicole
    > > >
    > > > "headware" <> wrote in message
    > > > news:...
    > > > > I'm using the listbox control with multiple selection to allow users
    > > > > to select items from a list and push a button to add those selections
    > > > > to a database. There are many items in the list and they might have to
    > > > > scroll down to get to the ones they want. The problem is that once
    > > > > they hit the button to add the items and the postback occurs, the
    > > > > listbox scrolls back up to the top of the list and they have to scroll
    > > > > back down to find where they were. Is there any way to prevent this
    > > > > from happening? Or if not, is there any way to scroll down to a
    > > > > certain item in the list programmatically? I can select any item I
    > > > > want programmatically, but it won't scroll to the selected items. I've
    > > > > read posts about putting in anchors but I can't get any of them to
    > > > > work. Any ideas?
    > > > >
    > > > > Thanks,
    > > > > Dave
    headware, Oct 15, 2003
    #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. Tom Wild
    Replies:
    1
    Views:
    710
    Jerry III
    Aug 21, 2003
  2. Craig G
    Replies:
    3
    Views:
    2,345
    arskselva
    Sep 22, 2009
  3. Lenard Gunda
    Replies:
    3
    Views:
    1,256
    =?Utf-8?B?S2FubmFuLlYgW01DU0QubmV0XQ==?=
    Aug 17, 2005
  4. jakeatkins via WebmasterKB.com

    Fade effect on top and bottom of page while scrolling

    jakeatkins via WebmasterKB.com, Jul 23, 2007, in forum: HTML
    Replies:
    54
    Views:
    3,202
    dorayme
    Jul 26, 2007
  5. Tina
    Replies:
    2
    Views:
    713
Loading...

Share This Page