13

When is inline code executed with relation to page/control lifecycle events such as init and load?

1
  • 1
    Inline code meaning anything between <% %> and <%= %>, but not <%# %> - data-binding expressions are executed when a control template is data-bound, which can happen at any stage prior to rendering. Commented Sep 21, 2009 at 7:27

1 Answer 1

16

Inline code is executed when the page is being rendered ie. after the Page_PreRender event and before the Unload event

Sign up to request clarification or add additional context in comments.

1 Comment

+1 - Just in case anyone wants a reference: msdn.microsoft.com/en-us/library/ms178135.aspx embedded code blocks run in the render phase (admittedly taken from another SO answer: stackoverflow.com/questions/15209500/…)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.