1. DataBinder uses reflection to dig a value out of an object, so it
is going to have some overhead. You have to weigh that performance hit
against the ease and maintainability of DataBinder. DataBinder will
still work if you change the type of the underlying datasource and the
syntax works in both VB and C#. On the majority of sites the
performance hit won't be signifigant.
2. Code behind has the advantages of intellisense and compile time
syntax and type checking. It's a personal preference but I prefer it
to <script> blocks because it is also cleaner.
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 9 Dec 2004 05:57:15 -0800, "meir" <ni******@inter.net.il>
wrote:
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 - does is matter if we use
codebehind or writing <script> tags in the aspx page? or
once compiling the solution, all the server side data
(wherever it is written) is compiled?
thanks