【正文】
trol 增加一個(gè)命名的項(xiàng)目叫給書寫namespace 的反應(yīng)。 因?yàn)槲艺?Visual Basic 發(fā)展應(yīng)用,使用書寫 控制是自然的選擇。 這是會(huì)議和申請物體提供的, 雖然在不同的水平。 ParseTextToFile 分析規(guī)定的 ASP 文件的內(nèi)容 并且創(chuàng)建輸出流。 基本上,瀏覽器必須 能發(fā)現(xiàn)它正要駕駛的頁是 URL 或者一個(gè)本地路徑名和 是否它包含 .asp 擴(kuò)展。 你寫作為發(fā)球人方面的它們 資源, 然后當(dāng)你意識到他們不太依賴運(yùn)行時(shí)間條件時(shí),你能 用 .asp 或者 .htm(1)擴(kuò)展把他們轉(zhuǎn)變成靜止的 HTML 頁。s engine from getting involved when the user wants to follow a link to a relative ASP page. The WebBrowser control raises an event, BeforeNavigate2, each time it is about to navigate to another URL. This event accepts a Boolean return value that you can set to True if you want to prevent the default operation from taking place. Figure 12 shows how to write the code that redirects any link to a local ASP page. LocalNavigate is the same subroutine that gets called when you click on the Go button. Figure 13 shows that the hyperlink works. Figure 13 Redirecting to ASP in Action?? Note that for pleteness you should also implement your own history mechanism. The standard one won39。re confused by the truncated output in the HTML textbox, don39。 % blocks. All the text outside of these markers is written to the Response object. It accumulates the text into an internal string buffer that emulates the stream where the real ASP Response object writes. In this way, the simulated Response object caches all the output, just as the real ASP Response does when buffering is on. Note that under IIS buffering is on by default, while it was turned off by default in earlier versions of IIS. In Figure 4, the method is used to clear any buffered text that you accumulated through repeated calls to . This Clear method plays exactly the same role it does in the real ASP object model you39。t always need to implement this feature in a clientside ASP object model. In fact, a local ASP page is normally accessed by one user at a time and state management is a far less important issue. From the perspective of an offline ASP viewer, the key ASP objects are Response and Request because they provide the basic functionality that make a page interact with the rest of the world. Whether you need to implement all or a part of the standard methods and properties depends on your particular project. Although ASP is tightly integrated with IIS and Microsoft Transaction Services (MTS), and COM+ environments, this doesn39。ll finish up the code, covering Request and Server plus some other related topics. This month39。s machine, and the only product that could be supplied with the CDs was Microsoft Inter Explorer or a custom Web browser. ASP looked like the natural choice for the Web side of the project, but what about the CD? To make ASP work offline without a Web server, you need code that extracts all the %161。170。s a very mon technique in scripting. Incidentally, this is the same technique that allows IIS to inject the true ASP object model in the scripting context of a serverside ASP page. This workaround also makes it possible for Windows script Host (WSH) scripts to rely on a systemprovided Wscript object. Call in Action When the browser39。170。m building here. Figure 11 explains the typical browser39。 不過,如果數(shù)據(jù)庫不非常易變并且頁產(chǎn)量不是 非常依賴用戶的輸入,你能容易為更好的性能憑借明白的老的 HTML。 這個(gè)月的代碼顯示 這種潛能的這方法并且典型 ASP 頁與合作,雖然不綜合。 全部邏輯被隱藏在 CAspParser 種類里,這暴露 3 個(gè)公眾功能: 預(yù)置, SetscriptControl 和 ParseTextToFile。 一 ASP 目標(biāo)模型客戶 問題與 Web 應(yīng)用一起一保持的不能說明工作越過 HTTP。 關(guān)鍵問題關(guān)系到你怎樣模擬反應(yīng)或者請求目標(biāo)和你怎樣運(yùn)行全部書寫 一個(gè) ASP 文件包含的代碼。 在 (象 MsgBox 那樣 )的每個(gè)名字后面有可編程序?qū)嶓w是否它是 A 具體語法分析程序的功能或者一個(gè)一定加工過程中的 COM 物體的方法。 它 收到 ASP 文件的名字,證實(shí)它有一次 ASP 擴(kuò)展,并且在它的所有內(nèi)容里讀。 現(xiàn)在讓我們更進(jìn)一不看一下 ASP 反應(yīng)物體的實(shí)施。 這變通辦法也使 Windows 書寫得以 主人 (WSH)手稿依賴一個(gè)系統(tǒng)提供的Wscript 對象。 在我的號外瀏覽器,我里 把語言確定成 VBscript 在形式期間裝事件。 基于我的個(gè)人經(jīng)驗(yàn),我建議,你實(shí)現(xiàn)一最小 套特征 (類似于我在這里討論的那些 )和延長確定什么時(shí)候你的頁需要支持 額外的 ASP 特征。 命令正文被選出和 分別處理。 作為在 C++里的一個(gè)好起點(diǎn),你能試驗(yàn) MFCIE或者 ATLBrowser 樣品,其中兩者都 用最新的平臺 SDK 來。 ASP 為工程的 Web 邊看起來象自然的選擇,但是 CD 怎么樣? 做 ASP 沒有 Web 服務(wù)器,你工作脫機(jī)需要編碼選出全部 %...%從頁的碼組 并且處理他們。 一臺 ASP 變換器的實(shí)際的 原因 沒問題,因此一臺 ASP 對 HTML 的變換器可能不是數(shù)千個(gè)程序員每天晚上夢想的工具。s go back to the page in Figure 8, which imports a Cascading Style Sheets (CSS) file: link rel=stylesheet href= The file name is not a URL and does not contain path information. This means that both IIS and the ASP offline browser will look for it in the current folder, where the hosting ASP page resides. You can also specify a fully qualified path name for the CSS and it will work fine as well. What happens if the page contains hyperlinks? If the anchor tag points to an existing absolute URL, then everything will work normally as the browsing engine simply navigates to the specified location. If the hyperlink refers to a relative URL that does not contain the protocolthen two things happen. First, the browser attempts to locate the specified page in the current location. If the page with the link is c:\pages\, then is assumed to be in c:\pages. An HTTP 404 error is returned if it isn39。re writing dual pages to be used on the Web as well as locally on a CD. When you invoke the Write method on , the text you pass in is added to an internal member variable that39。s article, Active scripting with Perlscript, in the August 1999 issue of MIND, explores the use of Perl with ASP. When it es to using the scriptControl you need to do three things: set up the language, add as many objects as you want to the script namespace, and execute the script code. In my special edition browser, I set the language to VBscript during the form load event. At the same time, I create instances of all the objects I want to be visible to the script engine at runtime. Named items visible to the parser at runtime is a concept that warrants further explanation. The whole set of named items forms the script39。ve divided the client area into three blocks: one for the actual HTML rendering, one for the original ASP text, and one for the expanded HTML text. Figure 2 shows