aspx頁面生成靜態頁面

2021-09-05 22:58:22 字數 527 閱讀 4245

通過aspx頁面生成靜態頁面,在*.cs檔案重寫page的render方法,接收頁面通過請求返回的hmtl**,然後再另存為*.html模板

**如下:

方法一:把本頁面生成html頁面

protected override void render(htmltextwriter writer)

方法二:請求其它頁面,再生成靜態頁面(但不能使本頁面生成靜態)

protected void btn_submit_click(object sender, eventargs e)

filepath += "1.html";

system.io.streamwriter swrite = new system.io.streamwriter(filepath, true, system.text.encoding.default);

swrite.write(contentstr);

swrite.flush();

swrite.close();

}

aspx頁面生成詳解

當我們訪問asp.net網頁時,如果是第一次訪問,系統會編譯相應的網頁,編譯好的內容會存入 windows microsoft.net framework version temporary asp.net files 專案名稱 隨機數 隨機數 中,下面我們通過詳細分析這個編譯好的內容來學習aspx...

aspx頁面生成詳解

當我們訪問asp.net網頁時,如果是第一次訪問,系統會編譯相應的網頁,編譯好的內容會存入 windows microsoft.net framework version temporary asp.net files 專案名稱 隨機數 隨機數 中,下面我們通過詳細分析這個編譯好的內容來學習aspx...

aspx生成靜態頁面

前台 如下 default.aspx 後台 如下 default.aspx.cs 注 其中hover為web專案名 using system using system.data using system.configuration using system.web using system.web....