網路公司裁員、網站關閉、電子報停刊…,經歷電子商務的退潮之後,有人開始質疑電子商務是不是被高估了。也許網際網路不再編織賺大錢的美夢,但經過這幾年的洗禮,網際網路已經成為大眾生活中的一部份,據說台北市的國中生能製作網頁者已經相當普遍,由此可見一斑,當網頁製作變成一般知識之後,想生存於網際網路,夠不夠專業將是決勝因素。在 .NET Framework底下,筆者很欣慰ASP(Active Server Pages)變得更專業了,簡單地回顧過去的ASP,我們至少可以指出幾個缺點:只能使用VB
asp.net 在asp.net中我們通過添加組件類來實現代碼重用在asp.net專案檔中添加組件類假如為conn.vb開啟這個檔案,這個檔案是public class connend class這樣我們有兩種方式來進行代碼重用一種方式為直接在class中寫代碼,一種為在外面定義一個namespaces如下(1)Public Class
asp.net Figure 2.5Output of Listing 2.1.5 when viewed through a browser.If you've worked with classic ASP, you are likely familiar with the concept of session-level variables. These variables are defined on a per-user basis
asp.net Figure 2.4Output of Listing 2.1.4 when viewed through a browser.Adding Elements to a QueueIn Listing 2.1.4, we begin by creating an instance of the Queue class, qTasks (line 5). In line 7 through 14, we add eight new
asp.net Figure 2.2Output of Listing 2.1.2 when viewed through a browser.Adding Elements to a HashtableIn Listing 2.1.2, we begin by creating an instance of the Hashtable class, htSalaries, on line 5. Next, we populate this
asp.net Cache Dependencies依賴可以使索引值在檔案改變時,或是在某一個指定時間被刪除 。讓我們看一下每種依賴。檔案依賴(File-based Dependency)檔案依賴是指,當磁碟上的一個檔案改變時,刪除Cache對象中的對應一項。下面讓我們看一個從XML檔案中讀取資料的例子。Dim dom As
asp.net Caching緩衝,就是將一些產生代價比較大的常用資料,儲存起來重用 。一般資料都儲存在記憶體中,因為從記憶體中讀取資料比從資料庫等其他地方要快。ASP.NET通過兩種方式支援緩衝:通過Cache API儲存任意資料,通過網頁輸出快取經常被訪問的頁面。讓我們來看一個例子。一個電子商務的網站,
asp.net|request|變數 Web form pages are HTTP-Based, they are stateless, which means they don’t know whether the requests are all from the same client, and pages are destroyed and recreated with each round trip to the server,
asp.net 請看下面的樣本:要在 Web 頁上顯示一個項目列表,而每個使用者需要不同的列表排序。項目列表是靜態,因此可以將這些頁面綁定到相同的快取資料集,而排序次序只是使用者特定的 UI 狀態的一小部分。ViewState 非常適合於儲存這種類型的值。代碼如下:[Visual Basic]<%@ Import Namespace="System.Data"
asp.net 'ASP Syntax (Implicit retrieval of Column Value property) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open("TestDB") Set RS = Conn.Execute("Select * from Products")