What is the code behind and Inline Code?

Code Behind

Code Behind refers to the code for an ASP.NET Web page that is written in a separate class file that can have the extension of .aspx.cs or .aspx.vb depending on the language used. Here the code is compiled into a separate class from which the .aspx file derives. You can write the code in a separate .cs or .vb code file for each .aspx page. One major point of Code Behind is that the code for all the Web pages is compiled into a DLL file that allows the web pages to be hosted free from any Inline Server Code.

Inline Code

Inline Code refers to the code that is written inside an ASP.NET Web Page that has an extension of .aspx. It allows the code to be written along with the HTML source code using a<Script> tag. It’s major point is that since it’s physically in the .aspx file it’s deployed with the Web Form page whenever the Web Page is deployed. tag. It’s major point is that since it’s physically in the .aspx file it’s deployed with the Web Form page whenever the Web Page is deployed.