Hi Eerl:
In asp.net there is no overhead in <% %> switching as in ASP days.
There can be, however, some additional overhead if you are using a lot
of DataBinder.Eval inside of the blocks versus writing code in the
code-behind.
In the end you'll have to measure the difference usng your specific
code, since "a lot" and "many properties" are relative terms.
I'd chose what feels best from a maintenance perspective and work from
there.
--
Scott
http://www.OdeToCode.com
On Fri, 9 Jul 2004 10:24:32 -0500, "Earl Teigrob"
<ea******@hotmail.com> wrote:
I have a DataGrid that needs to set many properites on its embeded controls
in the ItemTemplate and EditItemTemplate Templates. I have a choice between
using the inline <%# %> or the OnItemCreated / OnDataBound codebehind events
to set these properties. Is one way more effiecent then the other? I know
from classic ASP that doing a lot of context switching within a page was not
very efficient. Is that still that case in this senerio?
Thank you for your help
Earl