I am new to c# I just want to inherit from htmlinputfile control and override
default LoadPostData always returns
false I want it to return true it is not security violation because the
Value property is readonly. The user then does not have to reselect the file
to try upload again. I have a System.Web.UI.HtmlControls.HtmlInputFile
control that I use to
submit files. Before the file is successfully submitted I validate another
field on the form, it is the description of the file must be 500 characters.
I am adding the file to a site server library programmatically so if the
field is too long I want to return the user to the form with file still
selected in the HtmlInputFile control. I am using an error label to inform
the user to shorten the description. I do not want the user to have to
browse again to the same file after he has shortened the description. Right
now the file does not upload but the control is empty. ASP.NET does not let
me programmatically put the full filename and path back into the Value
property of the HtmlInputFile control. How can I do this? I have version
asp.net 1.1 I found this but I don't know enough where to start
.............
these controls do not save their viewstate. LoadPostData always returns
false. You can inherit from the class and
override LoadPostData to return true and try to restore the value, and still
have value readonly.
I am new to c# and asp net controls. is there example to inherit from
HtmlInputFile class and override LoadPostData to
return true I am using C# and this is challenging me bad. cindy
--
cindy
"Cor Ligthert [MVP]" wrote:
Cindy,
This is for me always the first start to problems with HTML controls. And
this special with the input file one.
http://msdn.microsoft.com/library/de...input_file.asp
This can be handled with javascript.
In VB.Net the javascript can be used with register.......... Be aware that
this have different implementations in version 1.x and 2.0
Cor
"cindy" <cm****@nospam.nospam> schreef in bericht
news:F7**********************************@microsof t.com...I am also having difficultly with the htmlinput file control I have a
script
to validate the entry if the validation fails I need to return to the form
with htmlinputfile value still selected in the input box. The validation
is
actually failing because of the file description that is entered into
another
field on the form.
I AM SORRY COR to post in this thread but MS does use the HTMLINPUTFILE in
documentation and I have not had luck in GOOGLE.
Do you think you could tell us where to post this question instead of
here?
--
cindy
"Cor Ligthert [MVP]" wrote:
Nathan,
A HTML control is not an ASPNET control. If it had extentions to handle
it
in a better way, than it would be an ASPNET control.
Therefore handling an HTML control is as it could be done forever in
HTML.
In my opinion is than the way to search for it on Google, but than not in
relation to DotNet but just as HTML control.
Cor
"Nathan Sokalski" <nj********@hotmail.com> schreef in bericht
news:eK**************@TK2MSFTNGP04.phx.gbl...
>I have a System.Web.UI.HtmlControls.HtmlInputFile control that I use to
>submit files. After the file is successfully submitted, I want the field
>to
>be reset so that the user knows the file was submitted. However, ASP.NET
>does not let you change the Value property of an HtmlInputFile control.
>How
>can I reset the HtmlInputFile control to it's original state? Thanks.
> --
> Nathan Sokalski
> nj********@hotmail.com
> http://www.nathansokalski.com/
>