about upload file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

does .net provide any control to upload file? as I need to use the following control to upload fil
<input id="Upload1" type="file" name="Upload1" runat="server"
but when I post back to server(haven't save the form yet, but doing other action), this control's value will lost. While other server control can keep their value

(Or I need to use a variable to store it, and when load the page that containing this control, I need to get the value of the variable, then assign to the file control. But it is true that I need to use the old way as asp does to remember the file control's value?

Thank you for help.
 
Check out this article on CodeProject:
http://www.codeproject.com/aspnet/fileupload.asp

Vincent said:
does .net provide any control to upload file? as I need to use the
following control to upload file
<input id="Upload1" type="file" name="Upload1" runat="server">
but when I post back to server(haven't save the form yet, but doing other
action), this control's value will lost. While other server control can
keep their value.
(Or I need to use a variable to store it, and when load the page that
containing this control, I need to get the value of the variable, then
assign to the file control. But it is true that I need to use the old way
as asp does to remember the file control's value?)
 
The contorl in this article's is what I'm using. But as the first post, it contains problem that the value of the contorl does not save at server automatically, so that I need to assign a variable to store it.
 
On postback what is the value of Upload1.PostedFile ?

Vincent said:
The contorl in this article's is what I'm using. But as the first post,
it contains problem that the value of the contorl does not save at server
automatically, so that I need to assign a variable to store it.
 
Back
Top