performance

  • Thread starter Thread starter meir
  • Start date Start date
M

meir

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
 
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.
 

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

Back
Top