我的Listbox项目有10多个,size设置为5,出现了滚动条,属性Autopostback=true。
点击底部的项目页面postback,滚动条跑到了最上面,我所选择的项藏到了下面。
我项每次都能看见我所选择的项,该如何定位滚动条呢?

解决方案 »

  1.   

    记录当前的selectedindex, 重新载入页面后设置selectedindex
    -----------------------------------------------------------
    优惠asp.net空间 www.kingtoo.net
      

  2.   

    只在page.ispostback=false的时候棒定LISTBOX的项,试看看.
      

  3.   

    http://www.cnblogs.com/lovecherry/archive/2005/05/17/157550.html
    --
    这是DG的方法,LB应该差不多
      

  4.   

    记录当前的selectedindex, 重新载入页面后设置selectedindex
      

  5.   

    javascript:
    yourListBox.scrollTop = "滚动前的值"
      

  6.   

    Autopostback=true!!!!
    好久没有用了~