Select the file and click OK to display the absolute path of the file in the text box.
public void getfilepath()
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "Arbitrary files (*. *)|*. *"; //type and description of the file
if (dlg.ShowDialog() == DialogResult.OK) //After the selection is made
{
string filePath = dlg.FileName;
textBox1.Text = filePath;
}
}
Read More:
- [Solved] configure: error: no acceptable C compiler found in $PATH
- [Solved] configure:error:no acceptable C compiler found in $PATH
- [Solved] prometheus Startup Error: opening storage failed
- C Language Compilation Error: variably modified ‘* *’ at file scope
- Sublime text 3 compiles and executes C/C++ programs directly
- How to Fix error 28 from storage engine
- [Solved] Centos7 Error: gcc: configure: error: in build‘: configure: error: no acceptable C compiler found in $PATH
- Chinese garbled problem when running. C file in Linux
- Ubuntu18.04 Compile A40i SDK Error: misc/create_inode.c:395:18: error: conflicting types for ‘copy_file_range‘
- [Solved] Linux C++ warning: ISO C++ forbids converting a string constant to ‘char*‘ [-Wwrite-strings]
- [Solved] Ubuntu Eclipse C/C++ Error: launch failed.binary not found
- MAC: Clion configure C compiler Error: The C compiler identification is unknown
- [Solved] Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
- [Solved] xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory #include <expat.h>
- Termux setting path environment variable
- C#: How to get the value or text value of the select drop-down list
- SCP path contains special characters Error [How to Solve]
- [Solved] Ubuntu pip Install Error: which is not on PATH
- Linux useradd Error: Creating mailbox file: File exists
- [Solved] Ubuntu Open jpg Image Error: Error interpreting JPEG image file (Not a JPEG file: starts with 0x89 0x50)