In the days of ASP/VBscript I would use a model similar to the ASP.NET postback model. The form action value would always be the same page that generated the form (giving you post*back*). In order to determine what actually triggered the postback I would test the form collection for each submit input's value. By nature of how HTML forms work, only the submit input (button or image) that you actually clicked on would submit a value, others would be left blank. Therefore it was simple to determine the control that triggered the post by checking each against an empty value with code like this:
If Request.Form("btnSubscribe") <> "" Then
'Do subscribe logic here
ElseIf Request.Form("btnSearch") <> "" Then
'Do search logic here
End If
This is basically what the ASP.NET runtime is doing under the covers. It is translating that into a control event for the button. You then handle that button event on the page as the button click handler method.
Now this is the case with simple image or button inputs. Basically every other type of postback trigger (link buttons, DDL selection changes, textbox onChange [which is really onBlur], etc) are hooked up to the __doPostback() method that ASP.NET emits to the page.
-Peter
compiledthoughts.com