We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get file name on selection of the file .(Asp.net MVC)

Thread ID:

Created:

Updated:

Platform:

Replies:

127926 Dec 19,2016 12:15 PM UTC Dec 20,2016 10:47 AM UTC ASP.NET MVC 1
loading
Tags: FileExplorer
Abhijeet
Asked On December 19, 2016 12:15 PM UTC



Please see below code for your reference:-


@Html.EJ().FileExplorer("fileExplorer").FileTypes("*.pdf,*.png, *.gif, *.jpg, *.jpeg, *.docx").Path("~/content/images/FileExplorer/").AjaxAction(@Url.Content("/FileExplorer/FileActionDefault")).Width("900px").Height("400px").IsResponsive(true).EnableRTL(false).ShowThumbnail(false)

Thanks for your Help.....
Abhijeet 

Karthik Ravichandran [Syncfusion]
Replied On December 20, 2016 10:47 AM UTC

Hi Abhijeet, 
  
Thanks for contacting Syncfusion support. 
  
We have analyzed your query. You can achieve your requirement (“How to get File name on selection of the file”) by using “Select” event of “FileExplorer” control. Please refer the below code block. 
  
     @Html.EJ().FileExplorer("fileExplorer").FileTypes("*.png, *.gif, *.jpg, *.jpeg, *.docx") 
        .Path("~/content/images/FileExplorer/") 
        .AjaxAction(@Url.Content("/FileExplorer/FileActionDefault")) 
        .Width("900px") 
        .Height("400px") 
        .IsResponsive(true) 
        .EnableRTL(false) 
        .ShowThumbnail(false) 
        .ClientSideEvents(evt => evt.Select("onfileselect")) 
  
  
[Script] 
  
function onfileselect(args) { 
alert(args.name); 
} 
  
  
  
  
  
For your convenience, we have prepared the sample and it can be downloaded from the following location

sample
 
For more details on FileExplorer “Select” event, please refer the below documentation ink: 
  

Please let us know if you require any further assistance.
 
  
Regards, 
Karthik R 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;