ASP.Net 是什麼?

ASP.Net 是什麼?

ASP.NET是一個Web開發平臺,它提供了一個全面的軟件編程模型,建立強大的Web應用程序,適用於PC,以及移動設備所需的基礎設施和各種服務。

ASP.NET HTTP協議之上,並使用HTTP命令和設置瀏覽器到服務器的雙向交流與合作的策略。

ASP.NET是微軟的一部分.Net平臺。遵守ASP.Net應用程序代碼,使用的可擴展性和可重用的組件或對象存在於寫入.Net框架。這些代碼可以使用整個類層次結構.Net框架。

在以下任何一種語言的ASP.NET應用程序代碼可以寫成:

  • C#

  • Visual Basic .Net

  • Jscript

  • J#

ASP.NET是用來產生互動,在互聯網上的數據驅動的Web應用程序。它包含了大量的文本框,按鈕和標籤控件,如裝配,配置和操作的代碼來創建HTML頁面。

ASP.Net Web表單模型:

ASP.NET Web表單交互的Web應用程序的事件驅動模型。瀏覽器一個web表單提交給Web 服務器,服務器返回一個完整的標記頁或HTML頁面響應。

所有客戶端用戶活動被轉發到服務器狀態處理。服務器處理客戶端操作的輸出和觸發反應。

現在,HTTP是一個無狀態的協議。 ASP.NET框架有助於在存儲有關的應用程序的狀態,其中包括:

  • Page狀態

  • 會話狀態

頁面狀態是客戶端的狀態,也就是說,在web形式的各種輸入字段的內容。會話狀態是集體獲得各個頁面的用戶訪問和工作,也就是說,整個會話狀態。要明確的概念,讓我們拿起一個購物車的例子如下。

用戶添加項目到購物車。選擇項目從一個頁面,說的項目頁面,收集的項目總數和價格在不同的頁面顯示說,在購物車頁面。只有HTTP無法跟蹤所有的信息來自各個頁面。 ASP.NET會話狀態和服務器端的基礎設施在全局範圍內收集到的信息會話跟蹤。

ASP.NET運行時進行跨頁請求從服務器而產生的ASP.NET運行時代碼的頁面狀態,並採用隱藏字段中的服務器端組件的狀態。

這樣服務器察覺的整體應用程序的狀態,並在一個兩層的連接方式。

ASP.NET組件模型:

ASP.NET組件模型提供了各種構建模塊ASP.NET頁面。基本上它是一個對象模型,它描述:

  • Server端的幾乎所有的HTML元素或標籤,像

    .

  • 服務器控件,這有助於在開發複雜的用戶界面,例如Calendar控件或GridView控件。

ASP.NET是一種技術,它的工作原理.NET架構,是包含所有與網絡相關的功能上.NET框架是一個面向對象的層次結構。 ASP.NET Web應用程序的頁面。當用戶請求一個ASP.NET頁面,IIS代表到ASP.NET運行時系統的頁面處理。

ASP.NET運行時轉換成一個類,它繼承從基類頁.Net框架的一個實例.aspx頁。因此,每個ASP.NET頁面是一個對象和它的組成部分,即服務器端控件也是對象。

Net框架3.5的組件

要在Visual Studio.Net下屆會議之前,讓我們來看看.Net框架3.5的各個組成部分。下表描述了.Net框架3.5和執行工作,他們的組成部分:

組件和它們的說明

(1) Common Language Runtime or CLR
It performs memory management, exception handling, debugging, security checking, thread execution, code execution, code safety, verification and compilation.Those codes which are directly managed by the CLR are called the managed code. When the managed code is compiled, the compiler converts the source code into a CPU independent intermediate language (IL) code. A Just in time compiler (JIT) compiles the IL code into native code, which is CPU specific.

(2) .Net Framework Class Library
It contains a huge library of reusable types . classes, interfaces, structures and enumerated values, which are collectively called types.

(3) Common Language Specification
It contains the specifications for the .Net supported languages and implementation of language integration.

(4) Common Type System
It provides guidelines for declaring, using and managing types at runtime, and cross-language communication.

Metadata and Assemblies
Metadata is the binary information describing the program, which is either stored in a portable executable file (PE) or in the memory. Assembly is a logical unit consisting of the assembly manifest, type metadata, IL code and set of resources like image files etc.

(5) Windows Forms
This contains the graphical representation of any window displayed in the application.

(6) ASP.Net and ASP.Net AJAX
ASP.Net is the web development model and AJAX is an extension of ASP.Net for developing and implementing AJAX functionality. ASP.Net AJAX contains the components that allow the developer to update data on a website without a complete reload of the page.

(7) ADO.Net
It is the technology used for working with data and databases. It provides accesses to data sources like SQL server, OLE DB, XML etc. The ADO .Net allows connection to data sources for retrieving, manipulating and updating data.

(8) Windows Workflow Foundation (WF)
It helps in building workflow based applications in Windows. It contains activities, workflow runtime, workflow designer and a rules engine.

(9)Windows Presentation Foundation
It provides a separation between the user interface and the business logic. It helps in developing visually stunning interfaces using documents, media, two and three dimensional graphics, animations and more.

(10) Windows Communication Foundation (WCF)
It is the technology used for building and running connected systems.

(11) Windows CardSpace
It provides safety of accessing resources and sharing personal information on the internet.

(12) LINQ
It imparts data querying capabilities to .Net languages using a syntax which is similar to the tradition query language SQL.