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

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,773
Latest member
Kaybee

Latest Threads

Top