I
IRAS Blues
Hi all,
I've got a form that consists of a bunch of textboxes and also file
upload inputs. For both sets of fields, I need to be able to add in
additional elements on the fly. This is done by an "Add Textbox" and
"Add Upload Fields" button that I use Javascript to add to the fields.
I use client-side Javascript only to add to the fields.
The problem comes when I submit the form. When I submit the form, the
files uploaded present no problems when I use Request.Files. But no
matter what, I can't seem to access the additional textboxes created
by Javascript from my server code. I have tried using FindControl and
Request.Form but both do not work.
One workaround I can think of is to use server-side code to add the
elements by doing a Postback everytime I click on the "Add Textbox"
button, but that would invariably involved uploading the files
selected in the File Upload fields which I want to prevent.
Does anybody know of a better way to do this?
Thanks
Wong
I've got a form that consists of a bunch of textboxes and also file
upload inputs. For both sets of fields, I need to be able to add in
additional elements on the fly. This is done by an "Add Textbox" and
"Add Upload Fields" button that I use Javascript to add to the fields.
I use client-side Javascript only to add to the fields.
The problem comes when I submit the form. When I submit the form, the
files uploaded present no problems when I use Request.Files. But no
matter what, I can't seem to access the additional textboxes created
by Javascript from my server code. I have tried using FindControl and
Request.Form but both do not work.
One workaround I can think of is to use server-side code to add the
elements by doing a Postback everytime I click on the "Add Textbox"
button, but that would invariably involved uploading the files
selected in the File Upload fields which I want to prevent.
Does anybody know of a better way to do this?
Thanks
Wong