it is very easy man you can add button with visible = "false" property and with
OnClick="button1_Click" property
button1_Click((object sender, System.EventArgs e)
{
}
the after you finish your code at the end call this button event
as follows:
button1_Click(null,null);
ex: as you say if user select open then the file will be opened and then a post back happen ok at the end of this code (and the file opened)call the empty function...easy
regard