I am trying to open a new page from the code. For this I used the following code on button click event
string pageURL = UIConstants.Url.PrintUserBRCs + "?" + UIConstants.ReportType + "=" + UIConstants.DetailReport;
string script = string.Format("window.open('{0}', null, 'height=600, width=800, status=yes, location=yes, menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbar=yes, titlebar=yes')", pageURL);
Page.ClientScript.RegisterClientScriptBlock(GetType(), "LaunchTemplate", script, true);
The new page is opening properly but it has the issue that the new page goes in the background while the old page appears at top.
I need to show the new page opened at top of previous page.
How can I do that.
Thanks in advance.
You can use
focus()like this: