Last post Feb 24, 2017 05:44 AM by Zhi Lv - MSFT
Feb 23, 2017 08:55 PM|mstrsftwr|LINK
I want to just call one page that loads reports urls from a database, then visits or opens those pages.
Right now, I have a task scheduler that visits each one of the urls but it's growing fast and I have to manually enter each on into the scheduler. Not much flexibility.
I know how to do all the database stuff except open the pages in code behind.
I hope this question makes sense.
thanks for any help on this.
Feb 24, 2017 05:44 AM|Zhi Lv - MSFT|LINK
Please try to use ClientScript.RegisterStartupScript to call js to open the page.
Attention that the second argument must be unique.
protected void Page_Load(object sender, EventArgs e)
DataTable dt = new DataTable();
dt.Rows.Add("about"); //page url
foreach (DataRow row in dt.Rows)
string Url = row["url"].ToString();
ClientScript.RegisterStartupScript(this.GetType(), "popup"+Url, "window.open('" + Url + "');", true);