顯示具有 UpdatePanel 標籤的文章。 顯示所有文章
顯示具有 UpdatePanel 標籤的文章。 顯示所有文章

2013年6月30日 星期日

UpdatePanel執行之後出現對話視窗

在執行UpdatePanel之後,如果需要出現對話視窗傳送訊息,可以利用這一段。


Dim jv As String = "alert('Hello');"


ScriptManager.RegisterClientScriptBlock(myControl, myControl.[GetType](), "msg", jv, True)

2012年10月15日 星期一

ASP.NET-MasterDetail執行順序


畫面上的物件有
GridView-Master
FormView-Detail
UpdatePanel
將FormView放在UpdatePanel裡面
當按下GridView的選取按鈕之後觸發FormView的更新

事件執行順序:
(M表master,D表detail)
    一、載入頁面的時候:
M_init
D_init
M_Load
D_Load
M_DataBinding
M_DataBound
M_PreRender
D_PreRender
M_Unload
D_Unload
    二、按下master的選取的時候:
M_Init
D_Init
M_RowCreated(2筆記錄run了4次)
M_Load
D_Load
M_RowCommand
M_SelectIndexChanged
M_PreRender
D_DataBinding
D_ItemCreated
D_DataBound
D_PreRender
M_UnLoad
D_UnLoad
    三、按下detail的command:
M_Init
D_Init
M_RowCreated(2筆記錄run了4次)
D_ItemCreated
M_Load
D_Load
執行按鈕的程式
M_DataBinding
M_RowCreated       (binding之後資料剩一筆,故只有Createdx3)
M_RowDataBound
M_RowCreated
M_RowDataBound
M_RowCreated
M_RowDataBound
M_DataBound
執行完GridView的binding
D_ItemCommand
M_PreRender
D_DataBinding
D_ItemCreated
D_DataBound
D_PreRender
M_UnLoad
D_UnLoad