Articles in this section
Category / Section

How to get the name of the file loaded in EditControl?

1 min read

In Edit control, it is possible to retrieve the file name loaded by using the property, DisplayedFileName. The following code example demonstrates the same.

 

C#

//Gets the name of the file loaded in the EditControl.
String filename = editControl1.DisplayedFileName;

 

VB

'Gets the name of the file loaded in the EditControl.
String filename = Me.EditControl1.DisplayedFileName

 

The following screenshots display the output before and after loading the file in EditControl:

Before loading the file in EditControl

Figure 1: Before loading the file in EditControl

After loading the file in EditControl

Figure 2: After loading the file in EditControl

Sample Links:

C#: EditControl_FileName_C#

VB: EditControl_FileName_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied