Think of what to write, see what copy of the copy. Haha
During the development process, through the search information, some experiences worth mentioning:
a) Compared with the original For statement Foreach has better execution efficiency, Foreach is only 30% of Forth. With the test results in FOR and Foreach, we recommend more efficient Foreach. In addition, it is approximately 10 times that of the read data time;
b) In the ASP.NET program, using the SA account is a very unsafe approach, which has permission to perform any operations on the database. Hackers can invoke an extended stored procedure like XP_CMDSHELL to attack;
c) When processing data interaction, try to put the processing of the organization SQL statement into the intermediate layer (such as a dedicated data operation class, stored procedure, etc.), which is an effective way to prevent injection attacks;
d) Avoid unnecessary round-trip processes of the server. Use Page.isPostback to avoid unnecessary processing on the round-trip process;
e) Be sure to disable debug mode;
f) Under normal circumstances, read a lot of data, do not do a large number of SQLDataReader for returning data. For returning data, a large number of DATSETs are appropriate. The choice of SqlDataReader and DataSet depends on the implementation of the program function;
g) The data binding is recommended to use <% # ctype (contactView) .Row ("Field Name")%>. When the amount of data is large, it can increase the speed of several hundred times;
From the above
Hedonister's column web development learning experience
* JavaScript print control
1. Button can't be placed in
2. Document.all ("PrintBTN"). style.visibility = 'hidden'; // Hide Print Button
3.
* Write an operation on the file on the server, need special designation
1. IIS's anonymous login role: Specify a role with write permissions
2. Web.config indicates the login form
* Get the control by = ((TextBox)). Text to get the control, not just in the DataGrid, will be used in the future.
*use
E.Item.cells [0] .attributes.add ("onclick", "RETURN CONFIRM ('delete?')"); to add a JavaScript confirmation box. * Where you can add regular expressions to do verify
Through session.abandon ();
Call GLOBAL's session_end event, at the same time, end your own login status protected void session_end (Object sender, Eventargs E) {Application.Lock (); Application.Remove (session.SessionId.tostring ()); Application [" OL_USERCOUNT "] = (int) Application [" OL_USERCOUNT "] - 1; Application.unlock ();} * Repeater is more free to install VS2003 in Windows 2003 more freely in Windows 2003, when running a web application: Pair path Access to "D: /Windows / Microsoft.Net/framework/v1.1.4322/temporary asp.net files / test / db58b339 / 50f84c0" is rejected. Description: Execute an unprocessed exception during the current web request. Check the stack tracking information to learn more about the error and the code caused in the code. Abnormal Details: System.unauthorizedAccessException: Access to the path "D: /Windows/Microsoft.net/framework/v1.1.4322/temporary asp.net files / test / db58b339 / 50f84c0" is rejected. ASP.NET is not authorized to access the requested resource. Consider grant the ASP.NET request ID access to this resource. ASP.NET has a base process identifier used when the application does not simulate (usually, {Machine} / aspnet on IIS 5, on IIS 6). If the application is using
protected void Session_End (Object sender, EventArgs e) {Application.Lock (); Application.Remove (Session.SessionID.ToString ()); Application [ "OL_UserCount"] = (int) Application [ "OL_UserCount"] - 1; Application .Unlock ();} * Repeater is more free to install VS2003 than DataGrid, and there is an error when running a web application: pair path "D: /Windows / Microsoft.net/framework/v1.1.4322/temporary Access to ASP.NET FILES / TEST / DB58B339 / 50F84C0 "is rejected. Description: Execute an unprocessed exception during the current web request. Check the stack tracking information to learn more about the error and the code caused in the code. Abnormal Details: System.unauthorizedAccessException: Access to the path "D: /Windows/Microsoft.net/framework/v1.1.4322/temporary asp.net files / test / db58b339 / 50f84c0" is rejected. ASP.NET is not authorized to access the requested resource. Consider grant the ASP.NET request ID access to this resource. ASP.NET has a base process identifier used when the application does not simulate (usually, {Machine} / aspnet on IIS 5, on IIS 6). If the application is using
to be continued