show / hide menu

How to get a File Name from Data Source

Getting File Name from Data Source

We have  a document library with files uploaded.

In the form include a FileUpload control and Select the particular files to that FileUpload control while setting up the datasource in the trigger of a button. This is shown below.

While doing this we are getting that particular file inside the FileUpload control. Now on the trigger of the FileUpload control write a rule as shown below.

Here, on the trigger of the FileUpload control we are getting the file name and setting it to the Label control.

GetFileName have the following syntax,

Where the second argument Has Extension can be set to True when the user needs to display the extension of a particular file.