.net

xiaoxiao2021-03-06  41

1.asp.Net Web Forms Framework is a scalable public language running library programming model that can be used to dynamically generate web pages on the server.

2. The server control automatically maintains any value input from the client between the round-trip of the server. This control status is not stored on the server (but stored in the request.

Forms field). Also note that the client script is not required.

3.httputility / httpserverutility -> Server object HTMLENCODE, URLENCODE, etc.

4.ASP.NET declarative data binding syntax uses <% #%> representation. You can bind to data sources, page, or other controls, collections, expressions, and results returned from way to the method. List controls can be bound to support

ICollection,

IENUMERABLE or

Collection of ILISTSOURCE interfaces, such as

ArrayList,

Hashtable,

DataView and

DataReader

5.

DataBinder.eval will bring significant performance losses to standard data binding syntax, as it uses later binding reflections, pay attention to this is important. use

DataBinder.eval needs to be cautious, especially when there is no string formatting, comparison:

Hashtable ht = new hashtable;

DataList.DataSource = HT;

<% # (DictionaryTry) .DataItem) .Key%> - <% # (DictionaryTry) Container.DataItem) .value%>

<% # DataBinder.eval (Container.DataItem, "Key")%> - <% # databinder.eval (container.dataitem, "value")%>

6.

Important: Always remember to close the connection to the data model before the page is executed. If the connection is not closed, it may not delister the connection restriction during garbage collection processing during the waiting page instance.

7.

SqlDataAdapter maintains a replacement variable identifier (represented by "@" before the name)

Parameters collection. Add a new name, type, and size of the name, type, and size of the specified parameters.

Sqlparameter, then put it

The Value property is set to the selected value.

Mycommand.selectcommand.parameters.add (New SqlParameter ("@ State", Sqldbtype.nvarchar, 2)); MyCommand.selectCommand.Parameters ["@ State"]. Value = MySelect.Value;

转载请注明原文地址:https://www.9cbs.com/read-112695.html

New Post(0)