If you are having trouble with retrieving the name of the posted file, or
the location to the posted file, make sure the form in which this control
exists has the enctype="multipart/form-data" as seen below.
<form id="DefaultForm" method="post" runat="server"
enctype="multipart/form-data">
</form>
When you upload your picture, you should be able to access it in your code
behind like this.
HttpPostedFile file = Request.Files["MyFileUpload"];
where the control is <INPUT name="MyFileUpload">
Hopefully I answered the right question for you.
--
Alex Mueller
"newmem" <""> wrote in message news:eq**************@TK2MSFTNGP14.phx.gbl...
Hi
In the webform, if a use selects a file to upload and submits the form.
But if page validation fails, the HtmlInputFile loses the filename string and
the user has to re-select the file using the browse button.
Is there any way to persist the postedFile.filename during postback?
Appreciate any help.