Are there any caching/performance/significant differences between c# code placed in <script runat='server'></script>
as oppose in the code-behind?
views:
284answers:
3
+5
A:
No, no performance difference, in the end this is always compiled to an assembly anyway.
Locksfree
2009-09-18 17:18:52
There seems to be a difference. Compilation errors within the <script runat="server"/> tag are caught not when the project compiles but when it gets hit at runtime.
burnt1ce
2009-09-24 20:10:25
+1
A:
No, it gets compiled to the same thing.
I suggest you use the code-behind file, in order to separate logic and markup.
driis
2009-09-18 17:19:04