As on_prakash_p says. You make the form action to call the same page you are on
<form id="form1" name="form1" method="post" action="samepage.asp" >
Then you need to check when the page reloads if it has called itself from a form. In this case if we pressed a button on the form called BTN_Submit the request form will NOT be blank so we just check
If Trim(Request.Form("BTN_Submit")) <> "" Then
Now this is where you can then loop through the recordset and and output the data