freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

外文翻譯---aspnet介紹以及內(nèi)聯(lián)代碼和共享-jsp程序-wenkub.com

2025-05-07 11:16 本頁面
   

【正文】 Framework 中的多個程序集都可自動提供給 應(yīng)用程序。默認情況下, Bin 目錄中的所有程序集都自動加載到應(yīng)用程序中,然后可供各頁訪問。為此,需要在應(yīng)用程序的 文件中注冊每個子目錄??梢栽? App_Code 目錄下放置多種語言的文件,前提是將這些文件劃分到各子目錄中(在 中用特定語言注冊這些子目錄)。幸運的是, 提供了幾種簡單的方法,使應(yīng)用程序中的所有頁都可以訪問代碼。使用分部類( 中的新增功能)可在代碼隱藏文件中直接訪問 ASPX 頁的服務(wù)器控件 ID。在這一新的代碼隱藏 模型中,頁被聲明為分部類,這使得頁和代碼文件可在運行時編譯為一個類。在您需要分別維護代碼和內(nèi)容(如有多個人員參與創(chuàng)建應(yīng)用程序工作)時,這種將代碼和內(nèi)容清楚區(qū)分的方法十分有用。此簡單示例演示了服務(wù)器控件模型內(nèi)在的基本機制,該模型使 成為最容易學(xué)習(xí)和掌握的 Web 編程模型之一。 下面的代碼示例演示一個包含以下三個服務(wù)器控件的簡單 頁:TextBox、 Button 和 Label。 每個 服務(wù)器 控件都可以公開包含屬性、方法和事件的對象模型。另外,還須注意不需要客戶端腳本。 下面的示例使用以下四個服務(wù)器控件: form runat=server、 asp:textbox runat=server、 asp:dropdownlist runat=server 和 asp:button runat=server。此外,服務(wù)器控件還簡化了在往返于服務(wù)器的過程中保留狀態(tài)的問題,自動在連續(xù)回發(fā)之間保留其值。服務(wù)器控件的主要優(yōu)點在于它們使開發(fā)人員可以從簡單的構(gòu)造塊組件獲取復(fù)雜的呈現(xiàn)和行為,從而大幅度減少了生成動態(tài)網(wǎng)頁所需的代碼量。 重要事項:盡管 % % 代碼塊提供了一種對從 頁返回的文本輸出進行自定義操作的強大方法,但這些代碼塊未提供一種清晰的 HTML 編程模型。 重要事項:與 ASP 不同,上述 % % 塊中使用的代碼實際上是使用腳本引擎編譯的,而不是解釋。因此,相同的 HTML 在每次發(fā)送到頁時都會被發(fā)送回客戶端,這會導(dǎo)致在請求之間窗體字段(文本框和下拉列表)的內(nèi)容丟失。 只需獲取現(xiàn)有 HTML 文件并將該文件的文件擴展名更改為 .aspx,就可以創(chuàng)建一個 頁。頁由代碼和 HTML組成,并在服務(wù)器上動態(tài)編譯和執(zhí)行以呈現(xiàn)給發(fā)出請求的客戶端瀏覽器。作為 ASP的繼承和發(fā)展, 頁框架消除了以前 ASP中存在的缺陷。 the piled type instance is then reused across multiple requests). An page can be created simply by taking an existing HTML file and changing its file name extension to .htm (no modification of code is required). For example, the following sample demonstrates a simple HTML page that collects a user39。s name and category preference and then performs a form postback to the originating page when a button is clicked: Important: Note that nothing happens yet when you click the Lookup button. This is because the .htm file contains only static HTML (no dynamic content). Thus, the same HTML is sent back to the client on each trip to the page, which results in a loss of the contents of the form fields (the text box and dropdown list) between requests. provides syntax patibility with existing ASP pages. This includes support for % % code render blocks that can be intermixed with HTML content within an .htm file. These code blocks execute in a topdown manner at page render time. The below example demonstrates how % % render blocks can be used to loop over an HTML block (increasing the font size each time): Important: Unlike with ASP, the code used within the above % % blocks is actually pilednot interpreted using a script engine. This results in improved runtime execution performance. page developers can utilize % % code blocks to dynamically modify HTML output much as they can today with ASP. For example, the following sample demonstrates how % % code blocks can be used to interpret results posted back from a client. Important: While % % code blocks provide a powerful way to custom manipulate the text output returned from an page, they do not provide a clean HTML programming model. As the sample above illustrates, developers using only % % code blocks must custom manage page state between round trips and custom interpret posted values. In addition to code and markup, pages can contain server controls, which are programmable serverside objects that typically represent a UI element in the page, such as a textbox or image. Server controls participate
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1