So here is my basic problem.
The user clicks the save button.
Use Ajax to save the content via code-behind.
THEN open a new window that loads the content from the DB.
I just need a way to not open the window until the content has been saved. Right now it immediately opens a new window and the content isn't all saved yet.
Any ideas?
EDIT:
Sorry, I guess I should of been more clear. I'm using the asp.net updatepanel and the button I click triggers the update panel to save some information to the DB and then I want to open a new window that "previews" this new data. So here is what I have and it doesn't break, but it doesn't open a new window either.
protected void lnkPreview_Click(object sender, System.EventArgs e)
{
temp1 control = UpdatePanel1.ContentTemplateContainer.FindControl("template") as temp1;
control.saveContent();
string script = "<script language='javascript'>window.open('/preview.aspx', '_blank');</script>";
this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(),"ClientScriptStuff", script);
}