In aspx page
<script type="text/javascript" language="javascript">
function sendMail() {
document.getElementById('form1').action = "http://sitename/modules/Webforms/capture.php";
document.getElementById('form1').method = "post";
form1.submit();
}
</script></script>
In .cs page
protected void btnsubmit_click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "ResizeRadWindow", "<script type='text/javascript'> sendMail(); </script>");
}