I have a textbox that searches the listbox below it and selects the text that I types in the textbox.
Now although the item is selected in the listbox I have to scroll to the end to see if the item is selected ornot
IS there a way that I can make the list box scroll to the selected item?
- Moved by Liliane Teng Wednesday, September 15, 2010 10:15 AM Please repost on appropriate forums for better support (From:Visual Basic General)
YourListbox.SelectedIndex = YourListbox.FindString(textbox.text)
Can be typos or other slight non correct changes in this message, but when you set it in your code you will see it.
You can also us FindStringExact which does like it tells.
- Proposed as answer by kleinmaMVP Thursday, September 09, 2010 3:16 PM
.Findstring and .Findstringexact are for windows and I am using a webform. I cant use it.
Maintain autopostback="true" is achieving the results in one app (on VS2008 ) but not on the app that I am working on right now.
Environment details: (not working)
- IIS 6 on Win Server 2003
- The virtual directory is running ASP.NET 2.0.50727
- I have set maintainScrollPositionOnPostBack="True" in the page directive Any ideas?
Welcome to MSDN Forum.
I have moved your thread to Off-Topic forum. For ASP.NET questions, please repost on appropriate forum as kaymaf suggested for more better and quicker support. Thanks for your understanding.
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact firstname.lastname@example.org
Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks