Question

Are there any caching/performance/significant differences between c# code placed in <script runat='server'></script> as oppose in the code-behind?

Was it helpful?

Solution

No, no performance difference, in the end this is always compiled to an assembly anyway.

OTHER TIPS

No, it gets compiled to the same thing.

I suggest you use the code-behind file, in order to separate logic and markup.

The number one significant difference to me is readability.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top