ASP. Net Multiple form submit

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

Guest

We are having multiple submit buttons with form validation on a single form.
By default a button is selected and the elememts included in the form is
validated.
If we try to add 2 forms to an ASP.NET page, we get a error:
"A page can have only one server-side Form tag."
How can we handle this scenario where there are multiple submit button with
validations in 1.1.

Thanks in advance
 
Add asp.net server side buttons. You can have multiples and handle the
action in the appropriate listener

Regards,
Tasos
 
All validators will fire on a submit. A submission of selective data fields
with validation is not possible. My query is like in ASP if a user clicks in
a form and enters only that form will be submitted. No validation to controls
in other form tag happens. How can I acheive this in ASP.net 1.1. I have
tried out with form visibility property, disabling client scripts on
pages(clienttarget=downlevel) etc many ways. Nothing is serving my purpose.
Thanks for your reply and pls help me out
 
Oh, I hadn't understood your problem.

I'd faced a similar issue with a form, where the validation was
depending on the value of a specific field and I used clientside code
to disable the validators.

Would you be interested in such a solution ?
 
Hi Tasos,
I aslo tried out with client script validation.
I will give u details of my requirment.

I am having a contact us form and a search filed on the same page.
The search box is included in a usercontrol and I am validating it using
javascript validation[I am checking for the value of the field. If it is
blank or "Search" iteself fire an exception else redirect ot my search page].
Ok, now on the contact us form I am having many fields where I am making use
of .Net validation.

Now the issue is when we browse the page and hit enter key by default the
search validation is happening.

In ASP if we click in a form and press enter the corresponding form only be
validated. I require a similar work around for this.

Thanks in advance
 
What I would do (it does not seem to elegant) is, overriding the submit
button OnClick event to call a javascript to disable the client
validator. Something like

btnOfContact.Attributes["onClick"]="ValidatorEnable(getObject('vldRequired'),
false);"

Regards,
Tasos
 
Back
Top