Databinding Best Practices

Discussion in 'ASP .Net Datagrid Control' started by Ryan, Nov 9, 2004.

  1. Ryan

    Ryan Guest

    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
    Ryan, Nov 9, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. karim
    Replies:
    0
    Views:
    439
    karim
    Jul 13, 2003
  2. John Dalberg
    Replies:
    3
    Views:
    558
    samuelhon
    Nov 16, 2006
  3. jobs
    Replies:
    0
    Views:
    1,591
  4. Earl Teigrob
    Replies:
    1
    Views:
    385
    Shravan
    Mar 1, 2004
  5. Chicken McNuggets

    Best book on C gotchas and best practices?

    Chicken McNuggets, Jul 31, 2013, in forum: C Programming
    Replies:
    9
    Views:
    254
    Fred J. Tydeman
    Aug 5, 2013
Loading...

Share This Page