Databinding Best Practices

R

Ryan

Hi.

I was wondering if anyone has encountered a performance
difference in the following 2 databinding techniques:

1. Displaying data in the HTML Code as such:

<%#DataBinder.Eval(Container.DataItem, "SOME_FIELD")%>

2. Displaying data using the code-behind ItemDataBound
event as such:

Dim lblTemp As Label
lblTemp = CType(e.Item.FindControl("lblSomeField"), Label)
lblTemp.Text = DataBinder.Eval
(e.Item.DataItem, "SOME_FIELD")

Thanks,

Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top