Describe the difference between inline and code behind -
which is best in a loosely coupled solution Tightly coupled
- INLINE

Answer Posted / m.sivakumar

Difference between inline and code behind - which is best?


Answers:
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.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are web server controls in asp.net?

558


Differentiate between namespace and assembly.

567


What is the namespace to create thread in .net?

530


What is in a session cookie?

544


What is the difference between exe and dll?

559






What is the purpose of master page?

523


What are the modes of updation in an updatepanel?

555


Explain how do you validate the controls in an asp .net page?

525


Explain the advantages of asp.net.

546


What are the built-in objects in asp.net?

562


What is the difference between CC and BCC?

620


What is Partial PostBack in ASP.NET?

610


How do you change the session time-out value?

585


Explain the difference between codebehind="mycode.aspx.cs" and src="mycode.aspx.cs"?

542


What are the layouts of ASP.NET Pages?

621