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
Why does my asp.net file have multiple tag with runat=server?
Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal
What is application Object?
Why is string called immutable data type?
If you are using components in your application, how can you handle exceptions raised in a component?
What is DataGrid wheater its a Server Control or something else ?
what is silver light when will we use silver light,
What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?
What are validator? Name the validation controls in asp.net?
What is http session state?
What is Web API Routing?
What is tracing? Where is it used?
What would be salary for 8+ years of experience in ASP.NET in different metro city in india?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
What is the difference between session and application?