I'm calling a popup window from my asp.net code behind file but the problem is that my window doesn't center.
Can anyone help ?
Here's my code:
String popupscript = "<script language='javascript'>window.open('" +
string.Format("ShowResume.aspx?profile={0}", gvwProfiles.SelectedDataKey.Value.ToString()) + "','Resume','location=1,status=1,resizable=1,scrollbars=1,width=800,height=600,left=((window.screen.width - 800) / 2),top=((window.screen.height - 600) / 2)');</script>;";
ClientScript.RegisterStartupScript(this.GetType(),"ShowResumePopup",popupscript);
Can anyone help ?
Here's my code:
String popupscript = "<script language='javascript'>window.open('" +
string.Format("ShowResume.aspx?profile={0}", gvwProfiles.SelectedDataKey.Value.ToString()) + "','Resume','location=1,status=1,resizable=1,scrollbars=1,width=800,height=600,left=((window.screen.width - 800) / 2),top=((window.screen.height - 600) / 2)');</script>;";
ClientScript.RegisterStartupScript(this.GetType(),"ShowResumePopup",popupscript);