PDA

Click to See Complete Forum and Search --> : 2 forms in one webform-page


fredrik
Mar 22nd, 2002, 01:16 AM
I need to have to submit buttons in the same webform-page.

The first button is used to add data to a database and the second button is used to change the properties of a datagrid.

The problem is that I use some "Required field Validator"-controls when I add new data and they are beeing used both when I click the "add Data"-button and when I click the "Change Prop."-button.

...so now I can't click the "Change prop"-button without filling in the fields used for "add data".

Any ideas?

thanks in advance...

Cander
Mar 22nd, 2002, 08:33 AM
you can always check the name of the sender object for the buttons onclick event you specify


Sub buttonclick(ByVal sender As Object, ByVal e As EventArgs)

If sender.Name = "somebutton" then
'do soemthing
Else
'do something else
End If

sender is always a reference to the the object that called the event.

fredrik
Mar 26th, 2002, 07:28 AM
Thank you for your answer.
The problem is that the "Required Field Validators" are "triggered" before I get to the Click_Event (as it is client-based).

Any ideas how to disable the "Field Validators" if I click the other button?