How to Browse , select a file and store it onto the txtbox
-
Hello everyone: I have a TxtBox with vertibal bar enable and Button. When user click on Button and and browse to select any file, that file would get store on that txtbox. I dont know how to started. Could someone please provide some sample code that I could work with? Thanks, Eyungwa
-
Hello everyone: I have a TxtBox with vertibal bar enable and Button. When user click on Button and and browse to select any file, that file would get store on that txtbox. I dont know how to started. Could someone please provide some sample code that I could work with? Thanks, Eyungwa
-
Hello everyone: I have a TxtBox with vertibal bar enable and Button. When user click on Button and and browse to select any file, that file would get store on that txtbox. I dont know how to started. Could someone please provide some sample code that I could work with? Thanks, Eyungwa
To let the user select a file take a look at the
FileOpenDialog
. An example how to use it is provided by its MSDN topic. How to load the file into a textbox was already answered in your other thread.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Hello everyone: I have a TxtBox with vertibal bar enable and Button. When user click on Button and and browse to select any file, that file would get store on that txtbox. I dont know how to started. Could someone please provide some sample code that I could work with? Thanks, Eyungwa
Thank you Ravi, tb_Text.Text = File.ReadAllText("C:\\Test"); I got this error saying " The name 'File' doesn't exist in the current context" I like to have txtbox display all the files from C:\Test\ folder and being able to add any file onto that fold as well. -- modified at 16:51 Wednesday 7th February, 2007
-
Thank you Ravi, tb_Text.Text = File.ReadAllText("C:\\Test"); I got this error saying " The name 'File' doesn't exist in the current context" I like to have txtbox display all the files from C:\Test\ folder and being able to add any file onto that fold as well. -- modified at 16:51 Wednesday 7th February, 2007