I think there is a better solution.
In the code-behind page each button will be registered as an object (if
you're using web forms buttons). Each button then has it's own onclick event
handler. Just place your code for each inside of each button's event
handler.
It would look something like this:
Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyButton.Click
End Sub
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Thierry" <Th*****@nospam.com> wrote in message
news:qh********************@phobos.telenet-ops.be...
Hi
I have a form with two buttons (insert and delete) and I want to validate
the input of those two buttons. How can I get the type of button in the
validation function?
Private Sub CValOrganisationName_ServerValidate
Select Case Me.Request.Form.Get(0)
Case "LinkBtnInsert"
{do something}
Case "LinkBtnDelete"
{do something}
End Select
End Sub
Me.Request.Form.Get(0) = "LinkBtnInsert"
So this works, but wat does that Me.Request.Form.Get(0) mean?
Is there maybe een better solution to this problem?
Thanks,
Thierry