High efficiency page binding

xiaoxiao2021-03-05  19

Today, when you make layers binding data, you want to know the DataItem usage, inadvertently discovering the following information. Collection.

This sentence program is often used when binding data: <% # databinder.eval (container.DataItem, "xxxx")%> or <% # databinder.eval (Container, "DataItem.xxxx")%>

Today, I learned one, and Microsoft also said that this method is more efficient than the above two.

<% # (DATAROWVIEW) Container.DataItem) ["xxxx"]%>

Very useful, so you can do a lot of things on the front page.

Also remember to use this must be imported into the namespace system.data in the front page, otherwise an error message will be generated.

<% @ Import namespace = "system.data"%>

This usage is actually the "DictionaryTry Container.DataItem) .Key%> is a truth.

The key is that container is something that is mysterious. Its namespace is System.comPonentModel. I also need further understanding for it.

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

New Post(0)