User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 423,086 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,363 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 259 | Replies: 2
Reply
Join Date: Sep 2007
Posts: 64
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

Search in .txt

  #1  
Jul 4th, 2008
How can i search in a .txt file wod by word...

I will have a textbox(and a search button) and I need to search for the word entered in the textbox....


and display all the result in the listbox


Sorry if this exists somewhere else....
just post me the link because i couldnt find...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Location: India
Posts: 66
Reputation: sierrainfo is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
sierrainfo sierrainfo is offline Offline
Junior Poster in Training

Re: Search in .txt

  #2  
Jul 5th, 2008
You can use these 2 methods - File.ReadAllText Method to read the file and String.Contains Method to search for the required string in the text from the file. You can then add the results to a listbox. Both these methods are mentioned in MSDN.
Reply With Quote  
Join Date: Sep 2007
Posts: 64
Reputation: Dell XPS is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Dell XPS Dell XPS is offline Offline
Junior Poster in Training

Re: Search in .txt

  #3  
Jul 7th, 2008
ok thnx...

i will check it and if i have any problems i will tell you

anyway thank you for replying
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 5:52 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC