Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Databinding Best Practices

Reply
Thread Tools

Databinding Best Practices

 
 
Ryan
Guest
Posts: n/a
 
      11-09-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs ASP .Net 0 09-25-2007 11:54 PM
Best Codeplex sample for showing best coding practices? John Dalberg ASP .Net 3 11-16-2006 12:07 PM
Gridview encoding, or how to run commands before gridview's default databinding, or, how do I disable default databinding at all? Sergei Shelukhin ASP .Net 1 11-12-2006 01:43 PM
DataGrid Custom Column Error when DataBinding "does not contain a definition for 'DataBinding'" Earl Teigrob ASP .Net Datagrid Control 1 03-01-2004 04:52 AM
Best sample app for learning best practices, OO & asp.net? karim ASP .Net 0 07-13-2003 04:26 AM



Advertisments