Cant set value of HTMLInputFile control

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi All,

I am trying to set the value of HtmlInputFile control programatically but I am getting the error that the value is not settable. The documentation shows that the value property is both read and write. Any help will be much appreciated.

Thanks in advance.
 
Mark,

You may have run into a case of incorrect documentation.

I haven't looked at the documentation (since I don't know where you were
looking), but using Visual Studio.Net's intellisense when I hover over
HtmlInputFile.Value it says the following: "Gets the full path of the file
on the client's computer." This means that "Value" is read only. If it
wasn't intellisense would say: "Gets or Sets the full path of the file on
the client's computer."

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


Hi All,

I am trying to set the value of HtmlInputFile control programatically but I
am getting the error that the value is not settable. The documentation shows
that the value property is both read and write. Any help will be much
appreciated.

Thanks in advance.
 
I don't think it can be set.

Why are you trying set to the value of the InputFile control on the server side? the control doesn't have access to the client side files anyway.

Jianjun
Hi All,

I am trying to set the value of HtmlInputFile control programatically but I am getting the error that the value is not settable. The documentation shows that the value property is both read and write. Any help will be much appreciated.

Thanks in advance.
 
Back
Top