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

正文內(nèi)容

教務(wù)管理信息系統(tǒng)畢業(yè)論文-資料下載頁

2025-06-26 21:05本頁面
  

【正文】 s 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。t explicitly map to one of the controls is assigned the type of . Important: Note that these server controls automatically maintain any cliententered values between round trips to the server. This control state is not stored on the server (it is instead stored within an input type=hidden form field that is roundtripped between requests). Note also that no clientside script is required. In addition to supporting standard HTML input controls, enables developers to utilize richer custom controls on their pages. For example, the following sample demonstrates how the asp:adrotator control can be used to dynamically display rotating ads on a page. Each server control is capable of exposing an object model containing properties, methods, and events. developers can use this object model to cleanly modify and interact with the page. Note, however, how much cleaner and easier the code is in this new servercontrolbased version. As we will see later in the tutorial, the page Framework also exposes a variety of pagelevel events that you can handle to write code to execute a specific time during the processing of the page. Examples of these events are Page_Load and Page_Render.The example below demonstrates a simple page with three server controls, a TextBox, Button, and a Label. Initially these controls just render their HTML form equivalents. However, when a value is typed in the TextBox and the Button is clicked on the client, the page posts back to the server and the page handles this click event in the code of the page, dynamically updating the Text property of the Label control. The page then rerenders to reflect the updated text. This simple example demonstrates the basic mechanics behind the server control model that has made one of the easiest Web programming models to learn and master.Note that in the preceding example the event handler for the Button was located between script/script tags in the same page containing the server controls. calls this type of page programming codeinline, and it is very useful when you want to maintain your code and presentation logic in a single file. However, also supports another way to factor your code and presentation content, called the codebehind model. When using codebehind, the code for handling events is located in a physically separate file from the page that contains server controls and markup. This clear delineation between code and content is useful when you need to maintain these separately, such as when more than one person is involved in creating the application. It is often mon in group projects to have designers working on the UI portions of an application while developers work on the behavior or code. The codebehind model is wellsuited to that environment. introduces an improved runtime for codebehind pages that simplifies the connections between the page and code. In this new codebehind model, the page is declared as a partial class, which enables both the page and code files to be piled into a single class at runtime. The page code refers to the codebehind file in the CodeFile attribute of the %@ Page % directive, specifying the class name in the Inherits attribute. Note that members of the code behind class must be either public or protected (they cannot be private).The advantage of the simplified codebehind model over previous versions is that you do not need to maintain separate declarations of server control variables in the codebehind class. Using partial classes (new in ) allows the server control IDs of the ASPX page to be accessed directly in the codebehind file. This greatly simplifies the maintenance of codebehind pages.Although you can place code inside each page within your site (using the inline or codebehind separation models described in the previous section), there are times when you will want to share code across several pages in your site. It would be inefficient and difficult to maintain this code by copying it to every page that needs it. Fortunately, provides several convenient ways to make code accessible to all pages in an application.Just as pages can be piled dynamically at runtime, so can arbitrary code files (for example .cs or .vb files). introduces the App_Code directory, which can contain standalone files that contain code to be shared across several pages in your application. Unlike , which required these files to be prepiled to the Bin directory, any code files in the App_Code directory will be dynamically piled at runtime and made available to the application. It is possible to place files of more than one language under the App_Code directory, provided they are partitioned in subdirectories (registered with a particular language in ). The example below demonstrates using the App_Code directory to contain a single class file called from the page.By default, the App_Code directory can only contain files of the same language. However, you may partition the Ap
點(diǎn)擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1