關於在Asp.Net中動態網頁面轉靜態頁面的方法網上比較多。結合實際的需求,我在網上找了一些原始碼,並作修改。現在把修改後的代碼以及說明寫一下。 一個是一個頁面轉換的類,該類通過靜態函數Changfile()來實現,動態網頁面到靜態頁面的轉換。using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Data; using
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta
建立檔案夾名稱"www.236z.com"<% Foldertocreate=server.mappath("") &"/cgi-bin/myfiles" Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateFolder(Foldertocreate) Set fs=nothing %> Done 刪除檔案 www.236z.com<%
精典ASP遍曆檔案檔案夾(ASP如何遍曆)<%@ Language=VBScript %><%powered by 25175.net function bianli(path) dim fso 'fso對象 dim objFolder '檔案夾對象 dim objSubFolders '子檔案夾集合 dim objSubFolder '子檔案夾對象 dim
<% Whichfolder=server.mappath("") &"/" Dim fs, f, f1, fc Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(Whichfolder) Set fc = f.filesFor Each f1 in fc Response.write (f1.name & "<BR>") Next
<%Function SubFolders(Path) Dim fso 'fso對象 Dim objFolder '檔案夾對象 Dim objSubFolders '子檔案夾集合 Dim objSubFolder '子檔案夾對象 Dim objFiles '檔案集合 Dim objFile '檔案對象 Set