The difference between a DataReader and a dataset
1, DataReader is only sequential forward reading data structure, occupy less memory, faster; the dataset is a data structure that dynamically (dynamic) processes records (which can be either forward-reversed payees data or record-readable) in a one-time read-in memory, occupying more memory Relative speed is relatively slow.
2, DataReader processing data need to connect the database all the time, but the dataset does not need to connect to the database after reading data.
3. DataReader can only process one result set, but multiple result sets (DataTable) may be stored in the dataset.
4. DataReader cannot be cached, but the dataset can cache the data.
Second, SqlHelper
In advance, the usual functions of the ADO are written in SqlHelper, the use of direct calls, shorten the development time, reduce the amount of code written.
Exectenonquery, ExecuteDataset, ExecuteScalar ... and other common functions in advance to do the encapsulation, when needed to call.
Third, IsPostBack
Distinguishes the postback request from the first postback and other operations when the Web page has a postback requirement.
Iv. Control Click events
OnClick: Server-Side Click event
OnClientClick: Client Click event
* * Perform a client click event before performing a server-side click event.
V. Methods for passing parameters between pages: Get pass Value
Add [?] after the page URL. And then the parameter name = the value of the argument is passed.
such as: <a href= "newspage.aspx?newsid=<% #Eval (" NewSID ")%>" > Details </a>
<% #Eval ("NewsId")%> ">: Binds the NewsId field value as it moves forward.
Vi. getting a variable value in the daemon
such as: <%=getnews ()%>//Get the value returned by Getnews () in HTML
* * String pieced together to get any kind of web page.
* * method to read a field value in tables in a dataset
Dt. Rows[0][title]. ToString ()//Gets the string value of the field called title in the first record in the DT table in the dataset
Ado. NET 3rd Talk