473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Performance of DataBinder.Eval

Howdy All,

I was reading an older posting about the performance hit of
DataBinder.Eval.

http://groups-beta.google.com/group/...2b1685ae0f63c0

Am I correct in understanding that

<%# ((DataRowView)Container.DataIt*em)["EmployeeName"] %>

would have better performance than
<%# DataBinder.Eval(Container.DataIt*em, ["EmployeeName"]) %>

Does anybody have comments on this or is there a better way to set the
values of the Template Column?

thanks

dbl

Nov 19 '05 #1
1 1137
DBL:
You are correct.

I can't give you numbers, but you ARE correct.

I will say 1 more thing however. Casting DataItem to the specific item
might be faster, but it violates your tiers and makes it harder to maintain.
Your presentation shouldn't know what TYPE of data source is being bound, it
should be implementation independent. The minute you start casting
everything, you make it a realy pain in the ass to change if you start using
collections or datasets.

Sometimes the penalty is too high to pay, but in my opinion in this case,
I'd strongly suggest you use DataBinder.Eval unless you have compelling
reasons why you shoudln't in your particular case.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"DBLWizard" <ib*********@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Howdy All,

I was reading an older posting about the performance hit of
DataBinder.Eval.

http://groups-beta.google.com/group/...2b1685ae0f63c0

Am I correct in understanding that

<%# ((DataRowView)Container.DataIt*em)["EmployeeName"] %>

would have better performance than
<%# DataBinder.Eval(Container.DataIt*em, ["EmployeeName"]) %>

Does anybody have comments on this or is there a better way to set the
values of the Template Column?

thanks

dbl
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
0
by: Don Pedro | last post by:
According to the documentation for the DataBinder class's Eval method should it only be used with discretion due to the fact it is latebound and uses reflection. "CAUTION Since this method...
2
by: dm_dal | last post by:
I have a control on my webform that I am binding to a dataset. The issue is, the field value in the dataset is encrypted and I am trying to decrypt it during the binding process: Example: ...
5
by: bg | last post by:
Hi! How do I check if "date" exists before using that code? I've built a RSSreader and sometimes there's a date in it and sometimes not. How can I check if it exists to avoid crash...
4
by: Søren Lund | last post by:
Hello, I am trying to bind a DataGrid with some data from a DataSet which contains fields in the form "group.fieldname". I am certain that my data source contains the field but I cannot get my...
1
by: Mike Lerch | last post by:
Pretty much, TSIA, but I'll expand a bit: I'm still trying to get my head around the n-tier approach to web design. It seems to me that when you use DataBinder.Eval in the ASPX that your tiers...
2
by: jack | last post by:
Hello, I have a date in a SQL Database and want to use the dateformat tools to format the output. I am now using the Month, Day, and Year to do it now. I want to change: Released Date:...
1
by: meir | last post by:
i have 2 general questions about performance: 1. i heard that using <%# databinder.eval(....)%> will effect the performance and i wanted to know it that's corrent. 2. also about performance -...
3
by: Eric Newton | last post by:
Given databinding an array of System.Version types: Given that "SomeObject" type has a Version property: public class SomeObject { public Version Version { get; } public string Description {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.