在軟體開發過程中,常會需要不斷地重複顯示與編輯資料。 ASP.NET Dynamic Data Website 是一種可以讓您只需要利用極少的程式碼或是根本不使用程式碼,建立資料導向的應用程式。 Scaffolding 是 Dynamic Data 中的一個重要機制,它指的就是由系統自動根據資料庫中的結構描述(Database Schema),產生網頁範本的機制。
2013年1月2日 星期三
2012年12月31日 星期一
Form驗證
什麼是 Forms 認證
Forms 認證是最廣泛應用的認證方式,尤其是應用在對外公開的網站,而不是僅內部人員使用的網站。
Forms 認證需要使用者提供密碼驗證,通常他們的資料來自於外部資料來源,如 Membership 資料庫,或是應用程式的組態檔中。 當使用者透過表單驗證成功之後,ASP.NET 會回應一個 cookie 給瀏灠器,作為驗證語彙基元(authentication token),用來表示這個認證過的使用者。 瀏灠器後續提出給網站的需求,都會同時送出這個 Token ,這樣子就不用每次要求都提供認證。 ASP.NET 則可以依這個 Token 驗證使用者的權限。
使用AJAX進行Form驗證
Profiles and Authentication
Profiles Service 和 Authentication Service 本來是 ASP.NET Forms Authentication system 機制底下所提供的標準服務。 而 AJAX Extensions Library 則是透過 script proxy 方式,在 Sys.Services 命名空間底下,提供 script 方法,讓用戶端可以直接存取這些服務。
2012年12月25日 星期二
Microsoft AJAX Library
使用 ASP.NET AJAX Library
Ajax Library 是從 .Net 3.5 開始被加進來,它是一組 client 端的 API ,而且其架構設計,很多看起來就像伺服器端的控制項一樣。 它提供許多好用的新功能,包含:
- 局部網頁更新。
- 透過 client script 叫用 web service 。
2012年12月23日 星期日
Health Monitoring 網站
當網站還在開發階段,我們隨時都可以使用 debug 或 trace 來除錯或追蹤網頁資訊。 如果網站在部署之後,我們想要監控系統的錯誤訊息或效能等問題, 就可以透過 ASP.NET 提供的「健康監視 (Health Monitoring)」功能, 將這些訊息輸出到指定事件記錄器或者資料庫之中。
2012年11月29日 星期四
資料繫結控制項(Hierarchical)
The HierarchicalDataBoundControl control serves as a base class for controls that render data in a hierarchical fashion. The classes that inherit from HierarchicalDataBoundControl are TreeView and Menu Control.
資料繫結控制項(Composite)
There are a number of data-bound controls that use other ASP.NET controls to display bound data to the user. For this reason, these controls are referred to as composite data-bound controls. These controls inherit from the base class, CompositeDataBoundControl . This class implements the INamingContainer interface, which means that an inheritor of this class is a naming container for child controls.
組合式的資料繫結控制項包含: GridView 、 DetailsView 、 FormView 、 Repeater 、 DataList 、 ListView 、 DataPager