This is my form:
<form method="post" action="admin_crimtrac_xml.asp" name="form6" style="display:inline">
<input type="hidden" name="TOPIC_ID" id="TOPIC_ID" value="<%=TOPIC_ID%>">
<input type="hidden" name="action" id="action" value="expcrimtrac">
<input type="submit" name="submit7" id="submit7" value="Export CrimTrac">
</form>
The page it calls has header information like so:
<%
Response.AddHeader "content-disposition","attachment; filename=crimtrac_"&Request.Form("TOPIC_ID")&".xml"
Response.ContentType ="application/xml"
%>
At the bottom of the same page I have some INSERT and DELETE statements that run ok updating information that is displayed on the originating page which stays in the background as the xml download dialog box appears in your screen. Refreshing the originating page shows the updated stats which are an audit trail of who exported the file (amongst other things). Hope that helps.