[C#]實現window.open

摘要:C#裡實現window.open

m_openFile = ../SurveyTemp/JoinPage_00.htm

 ScriptManager.RegisterStartupScript(this, this.GetType(), m_codeID, "window.open(\'" + m_openFile + "\','問卷版型');", true);

 

補充:

1.RegisterStartupScript(Control, Type, String, String, Boolean)

使用 ScriptManager 控制項,為 UpdatePanel 內部的某個控制項註冊啟動指令碼區塊,並將指令碼區塊加入至網頁中。

2.RegisterStartupScript(Page, Type, String, String, Boolean)

使用 ScriptManager 控制項註冊每次非同步回傳的啟動指令碼區塊,並將指令碼區塊加入至網頁中。