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

正文內(nèi)容

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

2025-07-11 11:16上一頁面

下一頁面
  

【正文】 ove 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 in the execution of the page and produce their own markup rendering to the client. The principle advantage of server controls is that they enable developers to get plex rendering and behaviors from simple buildingblock ponents, dramatically reducing the amount of code it takes to produce a dynamic Web page. Another advantage of server controls is that it is easy to customize their rendering or behavior. Server controls expose properties that can be set either declaratively (on the tag) or programmatically (in code). Server controls (and the page itself) also expose events that developers can handle to perform specific actions during the page execution or in response to a clientside action that posts the page back to the server (a postback). Server controls also simplify the problem of retaining state across roundtrips to the server, automatically retaining their values across successive postbacks. Server controls are declared within an .htm file using custom tags or intrinsic HTML tags that contain a runat=server attribute value. Intrinsic HTML tags are handled by one of the controls in the namespace. Any tag that doesn39。作為 ASP的繼承和發(fā)展, 頁框架消除了以前 ASP中存在的缺陷。 只需獲取現(xiàn)有 HTML 文件并將該文件的文件擴(kuò)展名更改為 .aspx,就可以創(chuàng)建一個(gè) 頁。 重要事項(xiàng):與 ASP 不同,上述 % % 塊中使用的代碼實(shí)際上是使用腳本引擎編譯的,而不是解釋。服務(wù)器控件的主要優(yōu)點(diǎn)在于它們使開發(fā)人員可以從簡單的構(gòu)造塊組件獲取復(fù)雜的呈現(xiàn)和行為,從而大幅度減少了生成動(dòng)態(tài)網(wǎng)頁所需的代碼量。 下面的示例使用以下四個(gè)服務(wù)器控件: form runat=server、 asp:textbox runat=server、 asp:dropdownlist runat=server 和 asp:button runat=server。 每個(gè) 服務(wù)器 控件都可以公開包含屬性、方法和事件的對象模型。此簡單示例演示了服務(wù)器控件模型內(nèi)在的基本機(jī)制,該模型使 成為最容易學(xué)習(xí)和掌握的 Web 編程模型之一。在這一新的代碼隱藏 模型中,頁被聲明為分部類,這使得頁和代碼文件可在運(yùn)行時(shí)編譯為一個(gè)類。幸運(yùn)的是, 提供了幾種簡單的方法,使應(yīng)用程序中的所有頁都可以訪問代碼。為此,需要在應(yīng)用程序的 文件中注冊每個(gè)子目錄。 Framework 中的多個(gè)程序集都可自動(dòng)提供給 應(yīng)用程序。默認(rèn)情況下, Bin 目錄中的所有程序集都自動(dòng)加載到應(yīng)用程序中,然后可供各頁訪問??梢栽? App_Code 目錄下放置多種語言的文件,前提是將這些文件劃分到各子目錄中(在 中用特定語言注冊這些子目錄)。使用分部類( 中的新增功能)可在代碼隱藏文件中直接訪問 ASPX 頁的服務(wù)器控件 ID。在您需要分別維護(hù)代碼和內(nèi)容(如有多個(gè)人員參與創(chuàng)建應(yīng)用程序工作)時(shí),這種將代碼和內(nèi)容清楚區(qū)分的方法十分有用。 下面的代碼示例演示一個(gè)包含以下三個(gè)服務(wù)器控件的簡單 頁:TextBox、 Button 和 Label。另外,還須注意不需要客戶端腳本。此外,服務(wù)器控件還簡化了在往返于服務(wù)器的過程中保留狀態(tài)的問題,自動(dòng)在連續(xù)回發(fā)之間保留其值。 重要事項(xiàng):盡管 % % 代碼塊提供了一種對從 頁返回的文本輸出進(jìn)行自定義操作的強(qiáng)大方法,但這些代碼塊未提供一種清晰的 HTML 編程模型。因此,相同的 HTML 在每次發(fā)送到頁時(shí)都會(huì)被發(fā)送回客戶端,這會(huì)導(dǎo)致在請求之間窗體字段(文本框和下拉列表)的內(nèi)容丟失。頁由代碼和 HTML組成,并在服務(wù)器上動(dòng)態(tài)編譯和執(zhí)行以呈現(xiàn)給發(fā)出請求的客戶端瀏覽器。 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。尤其是,它提供了創(chuàng)建和使用可封裝常用功能的可重用用戶界面控件的能力,從而減少了頁開發(fā)人員編寫代碼的數(shù)量,它還為開發(fā)人員提供了清晰、有序地構(gòu)造頁面的能力,以及可使開發(fā)工具真正做到所見即所得的功能。例如,下面的示例演示了一個(gè)簡單 HTML 頁,它收集用戶名和類別首選項(xiàng),然后在單擊某一按鈕時(shí)執(zhí)行窗體回發(fā),發(fā)送 至發(fā)起請求的頁。這可以提高運(yùn)行時(shí)執(zhí)行性能。服務(wù)器控件的另一個(gè)優(yōu)點(diǎn)在于可以很容易地自定義其呈現(xiàn)或行為。在運(yùn)行時(shí),這些服務(wù)器控件將自動(dòng)生成 HTML 內(nèi)容。 開發(fā)人員可以使用此對象模型清晰地修改頁以及與頁進(jìn)行交互。 調(diào)用此類型的頁編程 “代碼內(nèi)聯(lián) ”,如果您要在一個(gè)文件中
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1