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

正文內(nèi)容

計算機專業(yè)外文翻譯---用自定義控件簡化aspnet20中的數(shù)據(jù)綁定-jsp程序-資料下載頁

2025-05-11 17:51本頁面

【導讀】包含許多新的數(shù)據(jù)綁定功能,可以簡化各種數(shù)據(jù)庫綁定方案。序中是一種常見的方案,但它仍然是一個手動和耗時的過程。簡單控件數(shù)據(jù)綁定是指將單個值綁定到控件屬性的過程。例如,文本框、復選框、它可以擴展和支持Web窗體上的任何現(xiàn)有控件。消綁定、驗證、錯誤處理以及在基于窗體的Web界面中顯示錯誤等行為保持一致。也將深入探討這個細節(jié),就是控件是怎樣成的并介紹其中一些有趣的優(yōu)點。具體而言,該控件管理的綁定的概念。屬性綁定到DropDown列表的SelectedValue屬性”。提供了適當?shù)谋镜刂С帧4朔椒▽τ谌胝窘壎ǘ苑浅:?。盡管如此,也不能取消綁定并使數(shù)據(jù)重新成為底層數(shù)據(jù)字段或?qū)傩浴2恍业氖?,這些控件緊附于底。對于本地取消綁定機制而言,可能最嚴重的問題或許是處理取消綁定錯誤的方式。異常,但您不能得到信息,因為第一個異常將停止取消綁定過程。DataBindingItem用于保存每個已擴展控件的配置值。假設(shè)需要綁定到DataRow對象。夠通過引用Page來訪問DataRow。如上所示,CompanyName是應綁定到的字段名。

  

【正文】 xt, but if you39。re binding to a CheckBox, you likely bind to Checked or if you39。re binding to a list control to SelectedValue. Data binding can be oneway, twoway, or none. Input controls like textboxes generally use twoway binding, while display controls like labels use oneway binding. None is useful if you want a control to participate in binding error management, but you don39。t want to bind the control to a value. 14 The wwDataBinder control automatically manages both binding and unbinding errors. When a control cannot be bound or unbound, the control generates a BindingError in the BindingErrors collection, but no exception fires. You can query this collection for individual binding errors and retrieve a summary of errors with the ToHtml method. By default, each control with an error also displays an error icon next to it. Figure 2 shows an example of the form with a few binding errors. Figure 2 Displaying Binding Errors (Click the image for a larger view) BindingErrors can either be automatically generated by the control during the binding or unbinding process or can be manually added to the BindingErrors collection from your own code. Automatic BindingErrors are generated when an input value cannot be converted back to the bound data item or property, usually due to a data conversion error. For example, the Reorder Expected date shown in Figure 2 is an invalid date and the error is automatically captured by the control since the date conversion fails. Each DataBindingItem also has an IsRequired property and, not surprisingly, an item marked as IsRequired cannot be left blank. If one is left empty, a binding error is automatically generated and added to BindingErrors. 15 The other two errors on this form are manual errors. The Dairy Products error is handled through a ValidateControl event that is hooked up to the wwDataBinder. The event fires for each control bound and the event handler allows for checking each control after it has been unbound. If you decide a value is not valid in your code, you can set the BindingItem39。s BindingErrorMessage programmatically and return false to let the binder know that this DataBindingItem is in error and needs to display on the error list. The last error is a purely programmatic error that is added by using and specifying the error message and Control instance or ID in the Page code. This allows assigning an arbitrary error message to a control that is data bound and makes the control show up both with the icon and in the error listing. All of this provides for automatic and fully programmatic binding error generation so there39。s lots of flexibility on how errors and error icons are displayed. In addition, the control automatically picks up any Validator controls on the page and picks up their error messages and control IDs and incorporates them into the binding error mechanism. If a control has an error, an icon is displayed next to it by default. The icon display is optional and you can turn off the warning icons for the DataBinder as a whole, or you can change the location and format for each of the individual DataBindingItems through the ErrorMessageLocation property. By default, a WebResource is usedit points to an embedded image resource in the piled control assembly. Or you can override the image explicitly with the ErrorIconUrl property on wwDataBinder. The assembly also includes a wwErrorDisplay control, which is used to display the error summary shown in Figure 2. This control is optional, but I like to use it for consistency. In the example, I have simply assigned the method39。s string output to the text property. The control also has easy message display methods, like ShowError and ShowMessage, which display oneline messages with an icon, providing a consistent way to display messages on a Page. You39。ll notice that the error summary has links for each error displayed. These links jump to the individual control that is in error and highlight it, making it easier to 16 spot and fix errors.
點擊復制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1