Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.net inline code

Tags:

asp.net

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

like image 691
yogibear Avatar asked Sep 21 '09 04:09

yogibear


People also ask

What are inline expressions?

Inline expression is a piece of Groovy code in essence, which can return the corresponding real data source or table name according to the computation method of sharding keys.

Can we write C# code in ASPX page?

yes, you can write C# in aspx page. Yes, if you want write c# code in same aspx file. First time you add new item > web form > check/uncheck place code in separate file.

Is code that is embedded directly within the ASP.NET page?

Embedded code blocks are supported in ASP.NET Web pages primarily to preserve backward compatibility with older ASP technology. In general, using embedded code blocks for complex programming logic is not a best practice, because when the code is mixed on the page with markup, it can be difficult to debug and maintain.


1 Answers

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

like image 97
Darko Z Avatar answered Oct 04 '22 05:10

Darko Z