Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Vb.net show contenent of a file word in a text box


how is it possible ?
what function shall i use ? Open dialog ?=

Thanks guys, have a good day

What I have tried:

Vb.net show contenent of a file word in a text box


how is it possible ?
what function shall i use ? Open dialog ?=

Thanks guys, have a good day
Posted
Updated 23-Jan-17 23:03pm

If this is really VB.NET - i.e. a web application - then, no, you can't use a open dialog. That would open on the machine running the VB code - the server - not the client, so the user would never get to see the dialog. And you can't access files from the user machine from server code at all unless the user specifically uploads them to you - so a dialog at the client would be of no use either.

Stop and think about exactly what you are trying to do: if this is a web application then you need to work out where the files are, and how you are going to display them fairly carefully.

If it isn't web based, then explain exactly what you are trying to do, and what problem you have with it - remember that we can't see your screen, access your HDD, or read your mind so we only get exactly what you type to work with. We know nothing about your application, the environment it is supposed to work in, or how you have written it so far!
 
Share this answer
 
Comments
Member 12959566 24-Jan-17 6:27am    
Thank you !!!
Richard MacCutchan 24-Jan-17 6:36am    
VB.NET - i.e. a web application
Really? Do you need more coffee?
Member 12959566 24-Jan-17 8:04am    
Are u kidding me ?
Dave Kreskowiak 24-Jan-17 8:40am    
That comment was not directed at you.
Member 12959566 24-Jan-17 9:11am    
ah k
Get the file name: OpenFileDialog Class (System.Windows.Forms)[^].
Open and read the file: StreamReader Class (System.IO)[^].
Extract the text that you want and display it in the textbox.
 
Share this answer
 
Comments
Member 12959566 24-Jan-17 6:27am    
Thanks !!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900