該程式片段主要是<判斷檔案路徑是否有檔案,有就window.open,如沒有則轉到錯誤頁面處理>。

string url = "\\\\report\\\\exp_year_report_" + strYear + ".html";


string path = Server.MapPath("~") + url;
bool result = System.IO.File.Exists(path);//使用絕對路徑
if (result)

Anson Chiang 發表在 痞客邦 留言(0) 人氣()

20170201 

今天遇上一個困難的問題,說明如下:

開發環境:win 10/vs 2015/oracle 10g/ms sql2014

測試環境:win server 2018/iis 10

在本機開發後可連oracle db,連線字串為<connectionString="DATA SOURCE=XXXXX;PASSWORD=XXXXX;USER ID=XXXXX">

Anson Chiang 發表在 痞客邦 留言(0) 人氣()

ScriptManager

說明:VB語法-Window.open一個XXX.aspx的網頁。

ScriptManager.RegisterStartupScript(Me, Me.GetType, "ALERT", "window.open('ABC.aspx','1234','top=100,left=100,width=720,height=740,toolbar=no');", True)

Anson Chiang 發表在 痞客邦 留言(0) 人氣()

Function<BindGridView>

功能說明:當GridView無值時,仍會顯示表頭且內容為<無DATA>。

參數:DataTable InDT, GridView InGridView。

private void BindGridView(DataTable InDT, GridView InGridView)
    {

Anson Chiang 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。