Re: Programmatic access to HtmlInputFile value it is a runat serve



If you can populate the File-Path then what prevents somebody else from
putting what ever they want in it and upload any file from the client
machine.
The limitations on the HtmlInputFile are for security reasons and by design,

You should punish the user for not following the rules and ask them to
select the file again. I know this is a hassle but life if tuff.
If you find a solution please let us know.

Otherwise deal with it using ActiveX, Java Applet, or DotNet Compontents
that need security permissions anyway to run on the client side.

I like to see the hack.

Sa


"cindy" <cmello@xxxxxxxxxxxxx> wrote in message
news:F0D45117-D670-4E42-A4A5-A80D9B693D72@xxxxxxxxxxxxxxxx
no not security violation I just want to reload original file so user does
not have to reselect to try upload again. I do not want to change
readonly
of the value just the default behavior of LoadPostData to return false--
cindy


"msdn" wrote:

This looks like a security issue here. you are not allowed to do this.
What happens if I pre-populate your email address book or some important
file on your machine and upload it.
Other options may be an activex, java, or .NET control. again they must
be
trusted.

Sa


"cindy" <cmello@xxxxxxxxxxxxx> wrote in message
news:F2070996-779C-4BAA-9D55-EA16D0127BF8@xxxxxxxxxxxxxxxx
I found this but I don't know enough where to start
............
these controls do not save their viewstate. LoadPostData always returns
false, and the Value property is readonly. You can inherit from the
class
and
override LoadPostData to return true and try to restore the value, but
value
is readonly.

Example to inherit from HtmlInputFile class and override LoadPostData
to
return true I am using C# and this is challenging me bad. cindy


"cindy" wrote:

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
If there is a better thread to post this in please tell me where. I
have
searched on Google and cannot find anything. Can I "override" the
value
property to add the set? Please help. Cindy

--
cindy





.



Relevant Pages

  • Re: Programmatic access to HtmlInputFile value it is a runat server
    ... Other options may be an activex, java, or .NET control. ... Example to inherit from HtmlInputFile class and override LoadPostData to ... "cindy" wrote: ... selected in the HtmlInputFile control. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Programmatic access to HtmlInputFile value it is a runat serve
    ... not have to reselect to try upload again. ... Other options may be an activex, java, or .NET control. ... Example to inherit from HtmlInputFile class and override LoadPostData ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: why file upload cannot work?
    ... Is it possible to write a script that mimic's a user clicking the upload ... My point is instead that no Web standard says how a file input control is to ... but I grow a little tired of 'security precautions'. ...
    (comp.lang.javascript)
  • File upload - receive side only
    ... The page that contains the form with file upolad HTML control resides on ... I need to program the "receiving side" of the upload. ... I am wondering do I have to recode the ASP.NET file upload server-side code ... to achieve the same goals - being able to update upload progress in the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: File Upload User Control
    ... browser clears the upload input box (not allowed to set by server). ... | an InputFile HTML Server Control, an Upload button and a message label. ... | other form elements. ...
    (microsoft.public.dotnet.framework.aspnet)