I have to use Form.Action to redirect to a script that will be picking up values from my page. It is worth noting that this script is external.
My issue is that I also want the button that is clicked and has the Action hooked up to it, to also complete some functionality in the code behind first.
Is there anyway I can either :
In the buttons click event handler, can I set the Form.Action and then call something such as Form.Submit?
OR
Set up the Form.Action in advance and then somehow have the button posting back before the action takes place.
If this is not possible, any pointers in the correct direction with how I can achieve this would be appreciated.
If the page does not need to do validation/processing on server side when user clicks the button then you can do it like,
In ASPX:
If there is something to be processed/validated on server-side then do it like,
In ASPX:
In Page-behind-code: