DataBind is a new technology that binds "(binding" in the program's execution data from the page, in other words, as long as the corresponding data in the program Changes, then these properties, collections, expressions, and function results of these and data "bindings" will change the use of DataBind
Binding Properties: <% # Property%> Binds Collection:
Binding expression: <% # Container.DataItem%> Binding function results: <% # getform (user)%> Binding packets within the <% #%> tag, this is some of the <%%> tag Similarly, don't think that their "look" is almost the same, the difference is also the same, and the difference between <% #%> and <%%> is very large. The code between <%%> will be executed directly, and the code included between <% #%> will only be executed only after the DATABIND () method is called. Page and all Server space has a Database. For Page and Collection Controls, such as Panel, Placeholder, when calling Database in the parent container, all subms in this container will be "tired", which will be bound by programs. For example, when calling page.database () (or just use Database ()), all expressions in the face will be binded to the corresponding data binding: not each collection can be binded to the property of the control. The binding collection must support the iconnection interface, meet the criterion of the Conditions with DataReader ArrayList, DataView, Hashtable (hash table)
Binding expressions or methods require data binding to the control before some processing, for example, some optimization judgments, at which time the program can hand over the prior definition function, then return
SQL language
ADO.NETADO.NET uses the Connection object to connect the database system to use the Command or DataAdapter object to perform the SQL statement and return the result to DataReader or DataAdapter, then use the obtained DataReader or Adapter object to operate the data results. The three basic objects of Connection, Command, DataAPter can be divided into two categories: one class is used for OLEDB, and the other is dedicated to SQL Server database system. Therefore, there are two different types of database operation objects that OLEDBCONNECONNECTION, OLEDBCOMMAND, OLEDBADAPTERCOMMAND, SQLConnection, SqlCommand, SqlDataAdapter. Tip: ADO.NET, provides an interface between the database and the ASP.NET program, can connect to the database via OLE DB or ODBC (Open Database Connectivity), that is, as long as the server is installed with the corresponding database driver, Accessing and manipulating this data via an ASP.NET program: OLE is Microsoft's combined and developed product specifications, users can share different application information resources, developers can achieve different applications Standardization communication Note: ADO.NET is just an application-level data access interface, so it has nothing to do with the programming language. Whether it is using C # or VB, even JavaScript, you are using ADO.NET's approach.
Connection object
Operating the database, first of all, get a connection with the database system. The object of the ADO.NET connection database is Connection, creating a CONNECTION object is: OLE DB:
OLEDBCONNECONNECTION = New OLEDBCONNECTION ();
SQL:
SqlConnection myconnection = new sqlConnection ();
OLEDBConnection and SqlConnection are almost consistent with the method and attribute: get or set up the connection statement