Using Response.Write
before the Response is fully formed and sent back to the browser will cause the string to be written to the front of the stream.
There is actually a specific method to service this need, ClientScriptManager.RegisterClientScriptBlock
:
ClientScript.RegisterClientScriptBlock(this.GetType(), "scriptKeyNameCanBeAnythingYouWant", "var
@" win=window.open('vCard.aspx',null,'width=50,height=50," +
@"top=100,left=100','true');", true);
Reference for ClientScriptManager.RegisterClientScriptBlock
: http://msdn.microsoft.com/en-us/library/bahh2fef.aspx