版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、<p><b> 英文一原文:</b></p><p> ADO. Net Technology</p><p> ADO. NET is designed for solving the Web and program problem about the distribution application by Microsoft. As a kin
2、d of visit frame of database, ADO. NET can handle the N layer's data architecture which doesn't join that Web application program requires, thus when visiting the database of SQL SERVER, superior performance has
3、 gotten extensive application. This paper discusses for this. </p><p> I.The major object of ADO.NET.</p><p> Many objects in ADO.Net is similar to the object function in ADO , but the functi
4、on of the object in ADO.NET is more powerful. At the same time, except the objects of the Connection, Parameter and Command , ADO. NET also add a lot of new object and program melt interface, such as DataSet, DataView,
5、DataAdapter, DataReader and DataSetCommand etc..It make more simple to operate the database. </p><p> I.a DataSet object: DataSet is the core of ADO.NET, is specially used to handle the data which is read
6、 out from the stock , and keep it in local memory as away from line. We can use identical way to operate the data which is got from the different data source, the behavior of DataSet is consistent whatever the base layer
7、 database is SQL Server or Oracle. In DataSet, it can contain arbitrary quantity of DataTable, and every DataTable is in correspondence with Table or View in darabase. Genera</p><p> I.b DataReader objec
8、t: When looking over mass data with the way that glanced over , it will occupy plenty of memories and cause performance to drop. </p><p> For instance,when a link (Connection ) reads the record of 1000 line
9、s of database by using the traditional ADO Recordset ,it must give this link memory distribution for this 1000 lines of record untill the life period of this link finish. If there are many users carrying out the same o
10、peration for same computer at the same time,the memory will be used out. To solve these problems, DotNET frame has offered DataReader object, from database,it return a read-only string, which can roll downward on</p&g
11、t;<p> I.c DataView object: DataView object representative one DataTable approach by looking over , it is to put data in order with the form of form that what data acquiesce in look over way, and the order of da
12、ta that put data in order follow the order taking out the trip that put litre and the fence position of row order in order from database data sheet, usually it is concerned with the Sort Order or reduce power in inquirin
13、g string when design the database .ADO. NET offer the way that has elastici</p><p> I.d DataAdapter object: ADO. NET establish and initialize data sheet through DataAdapter, so as to keep the data in the m
14、emory combining with DataSet object. DataAdapter object can hide the details that links up with Connection and Command. DataAdapter object allow to put the data to the data source ( DataSource )which gets from DataSet ob
15、ject.It can also take out data from data source. By the same way,it can also operate the bottom data preserved by adding ,deleting or modifing. </p><p> II.Visit Database in joining </p><p>
16、II.a The analysis of a example which visit the database of SQL SERVER in ADO.Net technology</p><p> [ abstract ] With the thorough that applied along with distributed database, permanent database connection
17、 consumes resource fairly. When visiting the database of SQL SERVER, it can solve this problem perfectly with ADO . NET technology . This paper primarily discusses Net the major object of ADO.NET, and analyse the course
18、 of visiting SQL SERVER furtherly. </p><p> [ keyword ] ADO. NET visit XML independently </p><p> Drawing the bottom graph of the map, add new picture layer according to the fuction of defined
19、 , Setting picture layer visibility and so on: </p><p> / / constructs function </p><p> function FlashMap ( width: Number, height: Number, Geo_x: Number, Geo_y: Number ) { layersCount = 0; &l
20、t;/p><p> layers=new Array();</p><p> stageWidth=width;</p><p> stageHeight=height;</p><p><b> x=Geo_x;</b></p><p><b> y=Geo_y;</b&g
21、t;</p><p> Map_mc=_root.createEmptyMovieClip("Map_mc",0);</p><p> Map_mc.createEmptyMovieClip("Map_mc",-200);</p><p><b> }</b></p><p>
22、; //create object </p><p> Map = new FlashMap( stagewidth, stagehight, Mapx, Mapy); </p><p> //Loading map </p><p> function initMap () { Map. drawMap ();} </p><p>
23、 II.b The information inquiry of the map datas:The inquiry of datais was mainly carried out by the click of mouse and the choose of frame on the flash which is loaded with the line,the point and the side of layer .We ca
24、n see whether the field of the mouse choosing contain the object data through querying the courrent layer of the picture ,if exiting,to return the inquiry result in the new Form simplyand show it to the user. </p>
25、<p> The code of the script of mouse option:</p><p> Function select ( ) </p><p> { var selectedRegion: Array; </p><p> selectedRegion=new Array();</p><p>
26、for(j=0;j<Map.layersCount;</p><p> j++){var coverLayer:MapLayer=Map.layers [j];</p><p> for(i=0;i<converLayer.Regions_ary.length;</p><p> i++){var Region:MapRegion=MapRegio
27、n(coverLayer.Regions_ary [i]);</p><p> if(Region.isInRegion(_root._xmouse,_root._ymouse)){selectedRegion.push(coverLayer);</p><p> selectedRegion.push(Region);</p><p><b> }
28、 </b></p><p><b> }</b></p><p><b> } </b></p><p> III. The practice of concluding remarks proves , in database the campus geography information that
29、doesn't request too high, development data to lose comparatively demonstrate aspect, this is a kind of practical feasible , development the easy method with cheap cost. Besides, with the network electronic map colour
30、 of this kind of method produce completion, it is rich , content much shape, if wander the network electronic map plane of fictitious realistic technology and this kind of produce metho</p><p><b> 中文一
31、譯文:</b></p><p><b> ADO.Net技術(shù)</b></p><p> ADO.NET 是Microsoft 為解決Web 和分布式應(yīng)用程序問題而設(shè)計的。作為一種數(shù)據(jù)庫訪問框架, ADO.NET 能處理當(dāng)今N 層的Web應(yīng)用程序所要求的非連接數(shù)據(jù)體系結(jié)構(gòu), 因而在訪問SQL SERVER數(shù)據(jù)庫時, 性能優(yōu)越, 得到了廣泛應(yīng)用。本文對此進(jìn)
32、行了討論。</p><p> 一、ADO.NET 的主要對象</p><p> ADO.NET 中有很多對象與ADO 中的對象功能相似, 但ADO.NET 中對象的功能更強(qiáng)大。同時, 除Connection、Parameter、Command對象外ADO.NET 還添加了許多新的對象和程序化接口, 如DataSet 、DataView、DataAdapter、DataReader、Da
33、taSetCommand 等,</p><p> 使得對數(shù)據(jù)庫的操作更簡單。</p><p> 1、DataSet 對象: DataSet 是ADO.NET 的核心, 是專門用來處理從數(shù)據(jù)存儲中讀出的數(shù)據(jù), 并以離線方式存在于本地內(nèi)存中??梢允褂孟嗤姆绞絹聿僮鲝牟煌瑪?shù)據(jù)來源取得的數(shù)據(jù), 不管底層的數(shù)據(jù)庫是SQL Server 還是Oracle, DataSet 的行為都是一致的。在D
34、ataSet 中可以包含任意數(shù)量的DataTable, 且每個DataTable 對應(yīng)一個數(shù)據(jù)庫的Table 或View。一般來說, 一個對應(yīng)DataTable 對象的數(shù)據(jù)表就是一組DataRow 與DataColumn 的集合。DataTable 會負(fù)責(zé)維護(hù)每一筆數(shù)據(jù)行保留它的初始狀態(tài)和當(dāng)前的狀態(tài), 以解決數(shù)據(jù)庫的</p><p> 并發(fā)訪問問題。ADO.NET 的離線連接模式減少了對數(shù)據(jù)服務(wù)器的壓力。<
35、;/p><p> 2、DataReader 對象: 當(dāng)以瀏覽的方式查看大量數(shù)據(jù)的時候,會占用大量內(nèi)存, 導(dǎo)致性能下降。例如, 一個鏈接(Connection) 用傳統(tǒng)的ADO Recordset 對象去讀1000 行數(shù)據(jù)庫的記錄, 則必須為這1000 行記錄將內(nèi)存分配給這個鏈接直至這個鏈接的生命周期結(jié)束。如果有多個用戶在同一時間對同一計算機(jī)進(jìn)行同樣的操作, 則機(jī)器內(nèi)存將被過度使用。為了解決這些問題, DotNET
36、框架提供了DataReader 對象, 從數(shù)據(jù)庫返回一個只讀的、僅能向下滾動的串流(Strem), 而且當(dāng)前內(nèi)存中每次僅存在一條記錄。</p><p> 3、DataView 對象: DataView 對象代表一個DataTable 的數(shù)據(jù)查看方式, 數(shù)據(jù)默認(rèn)的查看方式是將數(shù)據(jù)以表格的形式排列, 且數(shù)據(jù)排列的順序遵循從數(shù)據(jù)庫數(shù)據(jù)表中取出數(shù)據(jù)時行排列的順序, 通常和設(shè)計數(shù)據(jù)庫時的Sort Order 或在查詢字符
37、串中指明排序的欄位、</p><p> 升降冪有關(guān)。ADO.NET 提供非常有彈性的方式以供用戶利用排序、條件過濾、查找等特性來定義不同的查看方式,從而編輯、瀏覽數(shù)據(jù)或顯示DataTable 中的數(shù)據(jù)。例如, 可以建立一個DataView對象,然后指定和以缺省的查看(DefaultView) 不同的排序方式, 或者也</p><p> 可以使用條件過濾(Filter) 只查看數(shù)據(jù)表中的
38、部分?jǐn)?shù)據(jù)。這種方式,可以將兩個以上的控制項綁定到同一個數(shù)據(jù)表, 但顯示的是不同的數(shù)據(jù)。</p><p> 4、DataAdapter 對象: ADO.NET 通過DataAdapter 對象建立、初始化數(shù)據(jù)表, 從而和DataSet 對象結(jié)合起來在內(nèi)存中存放數(shù)據(jù)。DataAdapter 對象能隱藏和Connection、Command 對象溝通的細(xì)節(jié)。DataAdapter 對象允許將DataSet 對象中的數(shù)
39、據(jù)保存到數(shù)據(jù)來源(DataSource) , 也可以從數(shù)據(jù)來源取出數(shù)據(jù)。同理, 也可以對底層數(shù)據(jù)保存體進(jìn)行數(shù)據(jù)的添加、刪除或修改操作。</p><p><b> 二、數(shù)據(jù)庫連接訪問</b></p><p> ADO.NET 訪問SQL SERVER數(shù)據(jù)庫的實例分析</p><p> [ 摘要] 隨著分布式數(shù)據(jù)庫應(yīng)用的深入, 永久的數(shù)據(jù)庫聯(lián)
40、接是相當(dāng)耗費資源的。在訪問SQL SERVER數(shù)據(jù)庫中, 采用ADO.NET 技術(shù)可以完美地解決這個問題。本文討論了ADO.NET 的主要對象, 并深入分析了其訪問SQL SERVER 的過程。</p><p> [ 關(guān)鍵字] ADO.NET 獨立訪問XML</p><p> 據(jù)其定義的函數(shù)繪制地圖底層圖形、添加新圖層, 設(shè)置圖層的可見性等等:</p><p>
41、<b> //構(gòu)造函數(shù)</b></p><p> function FlashMap (width:Number, height:Number,Geo_x:Number,</p><p> Geo_y:Number) {</p><p> layersCount = 0;</p><p> layers = n
42、ew Array () ;</p><p> stageWidth = width;</p><p> stageHeight = height;</p><p> x = Geo_x;</p><p> y = Geo_y;</p><p> Map_mc=_root.createEmptyMovieCli
43、p (" Map_mc" ,0) ;</p><p> Map_mc.createEmptyMovieClip (" Map_mc" ,- 200) ;</p><p><b> }</b></p><p><b> //創(chuàng)建實例</b></p><p>
44、; Map = new FlashMap (stagewidth, stagehight, Mapx, Mapy) ;</p><p><b> //裝載地圖</b></p><p> function initMap () {</p><p> Map.drawMap () ;</p><p><b>
45、; }</b></p><p> 2.4 地圖數(shù)據(jù)的信息查詢: 對于flash 上加載的地圖各圖層的點、線、面數(shù)據(jù)的查詢主要是鼠標(biāo)的點選和框選來實現(xiàn)的, 通過查詢當(dāng)前圖層中是否有實體對象數(shù)據(jù)包含在鼠標(biāo)選擇范圍內(nèi), 若存在則返回簡單查詢結(jié)果在新窗口中顯示給用戶。鼠標(biāo)選擇的腳本代碼為:</p><p> function select () {</p><
46、p> var selectedRegion:Array;</p><p> selectedRegion=new Array () ;</p><p> for (j=0; j<Map.layersCount; j++) { </p><p> var coverLayer:MapLayer = Map.layers [j] ;</p>
47、;<p> for (i=0; i<converLayer.Regions_ary.length; i++) {</p><p> var Region:MapRegion = MapRegion ( coverLayer.Regions_</p><p> ary [i]) ;</p><p> if ( Region.isInRegi
48、on ( _root._xmouse, _root._ymouse) )</p><p><b> {</b></p><p> selectedRegion.push (coverLayer) ;</p><p> selectedRegion.push (Region) ;</p><p><b>
49、 }</b></p><p><b> }</b></p><p><b> }</b></p><p><b> 3.結(jié)束語</b></p><p> 實踐證明, 在數(shù)據(jù)庫要求不高、動態(tài)數(shù)據(jù)較少的校園地理信息展示方面, 這是一種切實可行、開發(fā)容易、成本低廉
50、的方法。此外,采用這種方法制作完成的網(wǎng)絡(luò)電子地圖色彩豐富, 內(nèi)容多樣, 如果把虛擬現(xiàn)實技術(shù)與這種制作方法的網(wǎng)絡(luò)電子地圖結(jié)合起來, 就可以實現(xiàn)校園地理環(huán)境的平面漫游和空間漫游。這種網(wǎng)絡(luò)電子地圖的展示效果是傳統(tǒng)GIS 軟件很難達(dá)到的, 在校園地理位置展示和建筑小區(qū)展示等領(lǐng)域這種方法具有較大的發(fā)展?jié)摿Α?lt;/p><p><b> 英文二原文</b></p><p> T
51、he Data Binding Technology</p><p> In my project,I need to show the data from the DataBase,so I need to use the data binding technology which Microsoft company support.In the following ,let's discuss it
52、 together.</p><p> If you are familiar with classic ASP, the declarative data binding syntax introduced in ASP.NET will be familiar to you even though the functionality is vastly different. Data binding exp
53、ressions are the code you see between <%# and %> characters in an ASPX file. The expressions allow you to easily bind controls to data sources, as well as properties, expressions, and results from method calls expo
54、sed by the page. While this feature is easy to use, it often causes some confusion about what is al</p><p> Data binding basics</p><p> Data binding expressions link ASP.NET page properties, s
55、erver control properties, and data sources when the page's DataBind method is called. You can place data binding expressions on the value side of an attribute/value pair in the opening tag of a server control or anyw
56、here in the page. All data binding expressions, regardless of where you place them, must be contained between <%# and %> characters.</p><p> When used with data controls (like Repeater, DataGrid, and
57、so forth), the expression parameter is usually a column name from the data source. However, as long as it returns a value, any valid expression may be used. Likewise, the same syntax may be used outside list controls. Th
58、is includes displaying values on the page or populating control attributes.</p><p> Container.DataItem is a runtime alias for the DataItem bound to a specific item. It maps to an individual item from the da
59、ta source like one row from a database query or an individual element from an array. The actual data type for the DataItem is determined by the data source. So, if you're dealing with an array of integers, the DataIt
60、em will be an integer.</p><p> The following list provides a quick review of the VB.NET syntax for various scenarios:</p><p> <%# Container.DataItem %>--An array of string values is retu
61、rned. </p><p> <%# Container.DataItem("expression") %>--The specific field from a DataView container is returned. </p><p> <%# Container.DataItem.PropertyName %>--The spe
62、cific string property value of data source is returned. </p><p> <%# CStr(Container.DataItem.PropertyName) %>--Returns a property value converted to its string representation. </p><p> W
63、hen you're using C#, the syntax is a bit different. The following list includes the corresponding C# code for each line in the previous list. Notice the basic syntax is the same, but it changes when property values a
64、re returned and converted to the appropriate data type.</p><p> <%# Container.DataItem %> </p><p> <%# ((DataRowView)Container.DataItem)["PropertyName"] %> </p>&l
65、t;p> <%# ((ObjectType)Container.DataItem).PropertyName %> </p><p> <%# ((ObjectType)Container.DataItem).PropertyName.ToString() %> </p><p> Syntax is consistent when working wi
66、th page level properties and methods. The syntax remains the same as long as string values are returned. The following list provides some examples:</p><p> <%# propertyName %>--The value for a page le
67、vel property is returned. </p><p> <asp:ListBox id="lstValues" datasource='<%# propertyName %>' runat="server">--The value retrieved from the page level property (arr
68、ay, collection of objects, etc.) is bound to the data control. </p><p> <%# (objectName.PropertyName) %>--The value of the page level object property is displayed. </p><p> <%# Method
69、Name() %>--The value returned from the page method is displayed. </p><p> You may use individual values (albeit properties, method return values, and so forth) on a page using the following syntax:</p
70、><p> <%= Value %></p><p> The C# code in Listing A demonstrates data binding in an ASP.NET Web form. It selects employee names and telephone numbers from the SQL Server Northwind Employees
71、 table. The values from the query are displayed via an ASP.NET Repeater control. The column values are inserted via data binding, and the form's window title is populated using a method call. In addition, the ItemInd
72、ex property of the DataItem is used to display a row number. The ItemIndex property begins with zero, so one is added befo</p><p> Listing B contains the equivalent VB.NET code. The main difference is the u
73、se of parentheses as opposed to brackets in C#. Also, the casting of the rows is not necessary with VB.NET.</p><p> Using the Contain.DataItem object can be tedious, since you must be aware of the data type
74、 and convert it accordingly for use. Microsoft does provide the DataBinder class to further simplify development.</p><p> Microsoft documentation (on MSDN) states the DataBinder class uses reflection to par
75、se and evaluate a data binding expression against an object at runtime. This method allows RAD designers, such as Visual Studio .NET, to easily generate and parse data binding syntax. This method can also be used declara
76、tively on a Web form's page to simplify casting from one type to another.</p><p> You can use the Eval method of the DataBinder class to make .NET do the heavy lifting when using data values in an ASP.N
77、ET page. The Eval method accepts the previously covered Container.DataItem object; it works hard to figure out the details of the field identified in the expression and displays it accordingly. It has the following synta
78、x:</p><p> DataBinder.Eval(Container.DataItem, "field name", "optional formatting")</p><p> Using this syntax, you could rewrite the first example to use DataBinder.Eval to
79、 look like the C# code in Listing C. Listing D contains the equivalent VB.NET code.</p><p> The DataBinder.Eval approach is great as it pushes work to the system. On the other hand, you should use it with c
80、aution, since time and resources are consumed as the system locates the element and determines its object/data type.</p><p> Plenty of options</p><p> Data binding makes it relatively simple t
81、o include data in ASP.NET pages. There are various data binding options available, which include: binding the data to a control and allowing it to decide how it is presented, or choosing declarative data binding to contr
82、ol presentation within the ASP.NET page. In the end, it comes down to your preference, but it is great to have options.</p><p><b> 中文一譯文:</b></p><p><b> 數(shù)據(jù)捆綁技術(shù)</b></
83、p><p> 在我的項目中,我需要從數(shù)據(jù)庫顯示數(shù)據(jù),因此我使用數(shù)據(jù)捆綁的技術(shù) 它是由微軟公司支持的。如下,我們一起來談?wù)撍?lt;/p><p> 如果你熟悉經(jīng)典ASP,在ASP.NET介紹申明數(shù)據(jù)捆綁的句法與它在功能是有很大的不同。 數(shù)據(jù)捆綁的表達(dá)方式:就是能在ASPX文件中以在此形式(< %#和% >)之間出現(xiàn)的代碼。 這種表達(dá)方式允許你把控件很容易地綁定到數(shù)據(jù)源,連同屬性,語
84、法,結(jié)果值同時在方法調(diào)用時在頁面中顯示。 當(dāng)這些特性輕松的被使用時,由于它是否被允許能夠被調(diào)用而經(jīng)常造成一些的混亂。</p><p> 數(shù)據(jù)捆綁的基本原則:</p><p> 當(dāng)DataBind方法被調(diào)用時,數(shù)據(jù)就捆綁到ASP.NET的控件屬性,數(shù)據(jù)源。 數(shù)據(jù)表達(dá)式可以放置在頁面的任何一處,或置于服務(wù)器控件成對標(biāo)簽的之間的附值處。 所有數(shù)據(jù)捆綁的表達(dá)式,不論是將它們放置在哪,都必須包含
85、在< %#和% >標(biāo)志之間。</p><p> 當(dāng)數(shù)據(jù)控件(像轉(zhuǎn)發(fā)器一樣,DataGrid,如此等等)綁定時,表達(dá)參數(shù)通常是數(shù)據(jù)源的一張表的一個列名。盡管如此,只要返回一個數(shù)值,這個數(shù)值表達(dá)式就被調(diào)用了。 同樣地,相同的句法可以用在列表控件之外。 這主要包括在頁面上顯示數(shù)值或者是控件的屬性值。</p><p> Container.DataItem是專門為DataItem綁
86、定到特殊項上專門設(shè)置的控件。它指向數(shù)據(jù)源處的一個數(shù)據(jù)項目如表中的一個數(shù)據(jù)行或者是列表中的某個元素的值。 DataItem的實際的數(shù)據(jù)類型是由數(shù)據(jù)源確定的。 因此,如果你處理一個整型數(shù)組,DataItem的數(shù)據(jù)類型則是整型。</p><p> 下面的表達(dá)式是用VB.Net來調(diào)用在各種情況下Container.DataItem的調(diào)用情況,讓我們來快速的回顧下。</p><p> <
87、%# Container.DataItem % > --串價值的一個陣列被返回。 </p><p> < %# Container.DataItem (“表達(dá)”) % > --從一個DataView容器的具體的值被返回。 </p><p> < %# Container.DataItem.PropertyName % > --數(shù)據(jù)源的具體的串值被返回。 &
88、lt;/p><p> < %# CStr ( Container.DataItem.PropertyName ) % > --用被改變的一數(shù)值覆蓋其串值表達(dá)式值。 </p><p> 當(dāng)你使用C#時,句法是有點不同的。 下列表達(dá)式則在原先的列基礎(chǔ)上每行再加上相應(yīng)的C#代碼。 注意到基本的句法同樣,但是當(dāng)數(shù)值被返回和返回值被改變成為適當(dāng)?shù)臄?shù)據(jù)類型時,它就發(fā)生變化了。</p&
89、gt;<p> < %# Container.DataItem % ></p><p> < %# ( ( DataRowView ) Container.DataItem )["PropertyName" ] % ></p><p> < %# ( ( ObjectType ) Container.DataItem )
90、.PropertyName % ></p><p> < %# ( ( ObjectType ) Container.DataItem ).PropertyName.ToString ( ) % ></p><p> 句法是與當(dāng)頁面的屬性和方法一致的被。當(dāng)串值被返回時,語法結(jié)構(gòu)仍然保持不變。 如下則是提供了一些例子:</p><p> <
91、; %# propertyName % > --一頁面屬性值被返回。 </p><p> < asp:ListBox id="lstValues”datasource='<%# propertyName %>的runat="server" > --從頁面取回的數(shù)值(數(shù)組,對象集)綁定倒數(shù)據(jù)控件上。 </p><p>
92、< %# ( objectName.PropertyName ) % > --頁實例屬性值被顯示。 </p><p> < %# MethodName( ) % > --調(diào)用方法時返回的值顯示。 </p><p> 你能在Page頁上使用如下句法使用特殊的的數(shù)值( 屬性值,方法返回值,等等):</p><p><b> <
93、; %=數(shù)值% ></b></p><p> 在列表A中的C#代碼是用ASP.NET技術(shù)實現(xiàn)的數(shù)據(jù)捆綁。 它從SQL服務(wù)器Northwind雇員表中選擇雇員名稱和電話號碼。 查詢的數(shù)值是通過ASP.NET轉(zhuǎn)發(fā)器來控制顯示的。 列表數(shù)值通過數(shù)據(jù)捆綁的技術(shù)被插入,而Form的頁面數(shù)值是通過使用方法調(diào)用來實現(xiàn)數(shù)值的傳遞。此外,DataItem的ItemIndex屬性用來顯示一數(shù)字。ItemIndex
94、屬性從零開始,因此一但有數(shù)值顯示,它就自動的+1</p><p> 列表B包含相等的VB.NET代碼。 主要的區(qū)別在于在C#中應(yīng)用了括號。然而,這不是VB.NET的必須執(zhí)行的。</p><p> 當(dāng)意識到使用時必須知道數(shù)據(jù)類型并且要隨著應(yīng)用而發(fā)生改變時,就會覺得使用Contain.DataItem變得有些麻煩,不是很方便。因此微軟對DataBinder類作了改進(jìn),使它的應(yīng)用變得相對要簡
95、單些。</p><p> 在系統(tǒng)運(yùn)行時,微軟文件(在MSDN上)申明在DataBinder類中將數(shù)據(jù)綁定表達(dá)式的值的數(shù)據(jù)類型強(qiáng)制轉(zhuǎn)換成實例的數(shù)值類型。在Visual Studio .NET中,這方法讓RAD設(shè)計者很容易對數(shù)據(jù)捆綁的句法作語法分析。 這方法也能通過申明將一個Web的頁面類型很簡單的轉(zhuǎn)換成為另一種類型。</p><p> 當(dāng)在頁面中使用數(shù)據(jù)值時,DataBinder類的Ev
96、al方法能起著舉足輕重的作用。 Eval方法接受以前覆蓋的Container.DataItem對象; 它根據(jù)情況改變,根據(jù)表達(dá)式推算出字段的具體細(xì)節(jié)并且將它顯示出來。它有如下句法:</p><p> DataBinder.Eval ( Container.DataItem,“字段名”,“格式化選項”)</p><p> 使用這種句法結(jié)構(gòu),列表C.列表D中看起來象C#代碼,就能像使用Da
97、taBinder.Eval重寫第一個包含相同結(jié)構(gòu)的VB.NET代碼例子。</p><p> DataBinder.Eval方法應(yīng)用到系統(tǒng)中時,功能是很強(qiáng)的。 但同時,當(dāng)時間和資源隨著系統(tǒng)調(diào)用元素項并決定調(diào)用返回數(shù)據(jù)類型而慢慢耗盡時,就必須謹(jǐn)慎的使用。</p><p><b> 大量的選擇</b></p><p> 數(shù)據(jù)捆綁使得調(diào)用ASP.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 外文翻譯---改進(jìn)ado.net性能
- ado.net中的數(shù)據(jù)并發(fā)控制
- 基于ado.net數(shù)據(jù)源連接模式研究
- 基于ado.net的數(shù)據(jù)導(dǎo)入錄入方法的研究和應(yīng)用
- rfid技術(shù)外文文獻(xiàn)翻譯
- 基于ado.net的辦公信息平臺的研究與開發(fā)
- 基于ado.net網(wǎng)絡(luò)數(shù)據(jù)庫應(yīng)用系統(tǒng)的并發(fā)控制研究
- gbase 8a mpp cluster程序員手冊ado.net篇-
- 基于ado.net數(shù)據(jù)訪問考勤管理系統(tǒng)的研究與開發(fā)
- 食物包裝技術(shù)外文文獻(xiàn)翻譯
- 外文文獻(xiàn)翻譯
- 基于ado.net的分布式產(chǎn)品知識庫的研究與實現(xiàn)
- 外文文獻(xiàn)翻譯---數(shù)據(jù)挖掘技術(shù)簡介
- 交通工程專業(yè)外文翻譯外文文獻(xiàn)英文文獻(xiàn)
- plc外文文獻(xiàn)翻譯
- 外文文獻(xiàn)翻譯.doc
- 外文文獻(xiàn)翻譯.doc
- 外文文獻(xiàn)翻譯.doc
- 外文文獻(xiàn)翻譯.pdf
- 外文文獻(xiàn)翻譯.doc
評論
0/150
提交評論