CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP.NET - InMotion Framework

 FileUpload: Getting filename of uploaded file

Print topic Send  topic

Author Message
FRMK

Posts: 38
Posted: 03/20/2014, 6:53 AM

The FileUpload control appends a timestamp to the beginning of the filename.
Does anyone know how to retrieve the filename after a FileUpload?

Thank you.
_________________
FR
View profile  Send private message
cvboucher

Posts: 189
Posted: 03/20/2014, 9:31 AM

The following code placed in the AfterProcessFile event of the FileUpload control will display the filename with the timestamp on the page.

        MTFileUpload fu = (MTFileUpload)sender;  
        Response.Write(fu.Text);  
        Response.End();

Craig
View profile  Send private message
FRMK

Posts: 38
Posted: 03/20/2014, 9:37 AM

Thank you very much.

I thought I tried that, but I'll make sure. I appreciate you posting.
_________________
FR
View profile  Send private message
FRMK

Posts: 38
Posted: 03/20/2014, 2:52 PM

Hmmm - AfterProcessFile and BeforeProcessFile are not executing, even though
the file does upload.
_________________
FR
View profile  Send private message
eratech


Posts: 510
Posted: 03/20/2014, 6:55 PM

I think you can also use the Action 'Get Original Filename' but it only works in labels and links, although it should offer some code you could re-use elsewhere.

I've used it often, but in PHP projects, so I can't vouch for the .NET stuff.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
cvboucher

Posts: 189
Posted: 03/21/2014, 9:34 AM

Quote FRMK:
Hmmm - AfterProcessFile and BeforeProcessFile are not executing, even though
the file does upload.

I'm on the latest 5.1 so if you're not then maybe that is something that was fixed.

Craig
View profile  Send private message
FRMK

Posts: 38
Posted: 03/21/2014, 10:06 AM

I'm not on 5.1 yet - just 5.0. I'm afraid. :)

Do you think it's safe to step up to 5.1? Are you using it heavily without new problems for
.NET development?
_________________
FR
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.