B
Bijoy Naick
I've written a simple file upload user control in VB .NET. It comprises of
an InputFile HTML Server Control, an Upload button and a message label.
User clicks on the Browse button of the InputFile control, selects a file,
then clicks on the Upload button. The file is saved to a folder on the
server and the message label displays the appropriate msg. The user control
also has a SetFilePath method.. This is used by the page which includes the
control to specify where on the server the file should be written to.
My problem is this :
Lets say I have 2 instances of the user control on a aspx page, along with
some other fields. The form on this page has its own "Submit" button. I
click on the browse button on Control 1 and select a file. I then click the
Browse button on Control 2 and select another file. I also fill out the
other form elements. Now when I click the Upload button on Control 1, the
file gets saved as expected.. The data I entered into the other form
elements stays as is - also expected. But, the file selected on the 2nd
Control is now blank.
Dunno why this happens? Any ideas? I want the selection on the other control
to stay as is so that I can click on Upload and save the 2nd file as well.
Help appreciated..
Bijoy
an InputFile HTML Server Control, an Upload button and a message label.
User clicks on the Browse button of the InputFile control, selects a file,
then clicks on the Upload button. The file is saved to a folder on the
server and the message label displays the appropriate msg. The user control
also has a SetFilePath method.. This is used by the page which includes the
control to specify where on the server the file should be written to.
My problem is this :
Lets say I have 2 instances of the user control on a aspx page, along with
some other fields. The form on this page has its own "Submit" button. I
click on the browse button on Control 1 and select a file. I then click the
Browse button on Control 2 and select another file. I also fill out the
other form elements. Now when I click the Upload button on Control 1, the
file gets saved as expected.. The data I entered into the other form
elements stays as is - also expected. But, the file selected on the 2nd
Control is now blank.
Dunno why this happens? Any ideas? I want the selection on the other control
to stay as is so that I can click on Upload and save the 2nd file as well.
Help appreciated..
Bijoy