Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.
Inline Code:- Inline Code written along side the HTML in a page.
Code Behind:- Code Behind is simply a separate code file linked to your web form or .aspx page. Code is stored in separate file which is identified by a .cs suffix or .vb suffix.
Code Behind is the best. Because:- Separation of the content from the code. It is practical to have a designer working on a markup while a programmer writes code.
The best example of inline coding is classic asp which is too messy because both server side and client side code is written on the same page while on the code behind (asp.net), server side code is separated from the client side code.
InLine Code is directly embedded in your asp.net page, while in code behind model you'll have two file one for C# code or VB.Net code and other for html code. so one will be an aspx and other aspx.cs file
If I'm developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?