2007年9月20日 星期四

網頁與使用者控制項建立順序

DefaultPage_Page_PreInit
WebUserControl1_Page_Init
WebUserControl2_Page_Init
DefaultPage_Page_Init
DefaultPage_Page_InitComplete
DefaultPage_Page_PreLoad
DefaultPage_PageLoad
WebUserControl1_PageLoad
WebUserControl2_PageLoad
DefaultPage_Page_LoadComplete
DefaultPage_Page_PreRender
WebUserControl1_Page_PreRender
WebUserControl1_Page_PreRender
DefaultPage_Page_PreRenderComplete

2007年9月9日 星期日

Build Action of project

因為用了third party 的元件,因此在建置專案時,
VS會*.vbproj中紀錄,要把BuildAction = "Compile",改成BuildAction = "None"
,這樣建置專案,就不會編譯這個元件

int buildAction = 3;
ProjectItem projItem = project.ProjectItems.AddFromFile(fullPath)
projItem.Properties.Item("BuildAction").Value = buildAction;
//Possible Values for buildAction are:
0 - none
1 - compile
2 - content
3 - embedded Resource