fileupload - default file?

G

Guest

I want to implement a repetitive admin function of kicking off an operation
using a file that changes infrequently. All I'm interested in is the file
name and path, I'm not performing any file transfer.

I've put a fileupload control on the page to allow the user to specify the
file. Now I want to push/pull the details to/from appsettings so the user
doesn't have to browse to the file if it hasn't changed.

However I can't set default values of filename and hasfile because they are
readonly. Is there a way around this, or should I be using a different
control?

Thanks in advance
David
 
G

Guest

Apparently FileUpload members are readonly for security reasons, so can't
proceed with the approach originally described.

Instead displayed the appsetting filepath in a label and updated both label
and appsetting when user selected a file (myFileUpload.HasFile == true). Got
the full name and path of the file from myFileUpload.PostedFile.FileName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top