Problem with HTMLInputFile


I'm trying to edit a script made by someone else.

The problem I'm having is that the fileupload module doesn't work?

It says that the value property in HTMLInputFile not can be set.

Where should I look for answers?

Who is Participating?
ThogekConnect With a Mentor Commented:
The HtmlInputFile.Value Property appears to be read-only:

"Note   The Value property is read-only. If you attempt to assign a value to this property, a System.NotSupportedException is thrown."
Need more details... What is "HTMLInputFile" ? How are you using that ? Need some code to...
Silly question: Why would you want to modify the property that stores "the full path of the file on the client's computer" anyway?
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Yes, it's an HTML limitation/feature. No custom control or fancy code can circumvent that.
Well, the HtmlInputFile.Value property contains the path of the submitted file indicated where _on the client's computer_ it is located.  Client.  As is browser.  Not something the server should have any need or reason to want to change, since it's only indicating where the file came from -- not where it's going or anything else relevant to its handling on the server.

Hence my question above: What it is that you are trying to do that led you to try modifying the HtmlInputFile.Value property?  (If we understand that, perhaps we can suggest an alternative way to do it.)
HermundAuthor Commented:
Thanks for your help!

This is not my code. I've been assigned the job of fixing code from someone else. I don't know yet why they would want to change the value property.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.