I have a webpage in asp.net 3.5 that uses the FileUpload control. When a user clicks on the "Browse" button (which is part of the control) the control displays a file select popup (dialog box). When the user selects the file which they wish to upload, by default the full path to the file is shown in the textbox (which is also part of the control); however, I wish for it to only display the file name and not the full path. Anyone know of a slick and easy way to do this?
Display only file name in FileUpload control
asp.netfile upload
Best Answer
I'm pretty sure that isn't possible. You cannot set the value inside of the FileUpload control's textbox at anytime, via server side or client side script.