· Differences
1. Difference between Classic ASP and ASP.Net?Answer:
§ ASP is Interpreted language based on scripting languages like Jscript or VBScript.
§ ASP has Mixed HTML and coding logic.
§ Limited development and debugging tools available.
§ Limited OOPS support.
§ Limited session and application state management.
§ Poor Error handling system.
§ No in-built support for XML.
§ No fully distributed data source support.
while
while
§ ASP.Net is supported by compiler and has compiled language support.
§ Separate code and design logic possible.
§ Variety of compilers and tools available including the Visual studio.Net.
§ Completely Object Oriented.
§ Complete session and application state management.
§ Full proof error handling possible.
§ Full XML Support for easy data exchange.
§ Fully distributed data source support.
2. What's the difference between Response.Write() and Response.Output.Write()?
Answer: Response.Outout.Write allows us to write the formatted out put.
Answer: Response.Outout.Write allows us to write the formatted out put.
§ A DataSet can represent an entire relational database in memory, complete with tables, relations, and views, A Recordset can not.
§ A DataSet is designed to work without any continuing connection to the original data source; Recordset maintains the contentious connection with the original data source.
§ There's no concept of cursor types in a DataSet, They are bulk loaded, while Recordset work with cursors and they are loaded on demand.
§ DataSets have no current record pointer, you can use For Each loops to move through the data. Recordsets have pointers to move through them.
§ You can store many edits in a DataSet, and write them to the original data source in a single operation. Recordset can have a single edit at a time.
§ Dataset can fetch source data from many tables at a time, for Recordset you can achieve the same only using the SQL joins.
4. What is the difference between an abstract method & virtual method?Answer: An Abstract method does not provide an implementation and forces overriding to the deriving class (unless the deriving class also an abstract class), where as the virtual method has an implementation and leaves an option to override the it in the deriving class. Thus Virtual method has an implementation & provides the derived class with the option of overriding it. Abstract method does not provide an implementation & forces the derived class to override the method.
5. What are the different types of assemblies? Explain.Answer: Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.
6. What are the difference between Structure and Class?Answer:
§ Structures are value type and Classes are reference type.
§ Structures can not have constructors or destructors. Classes can have both contractors and destructors.
§ Structures do not support Inheritance, while Classes support Inheritance.
7. What are the difference between const and readonly?Answer:
§ A const can not be static, while readonly can be static.
§ A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.
§ A const's value is evaluated at design time, while a readonly's value is evaluated at runtime.
8. Differences between dataset.clone and dataset.copyAnswer: dataset.clone copies just the structure of dataset (including all the datatables, schemas, relations and constraints.), However it doesn't copy the data. On the other hand dataset.copy, copies both the dataset structure and the data.
9. Describe the difference between inline and code behind. Answer: Inline code written along with the html and design blocks in an .aspx page. Code-behind is code written in a separate file (.cs or .vb ) and referenced by the .aspx page.
10. What is Difference between Namespace and Assembly?Answer: Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.
11. What is the difference between early binding and late binding?Answer: Calling a non-virtual method, decided at a compile time is known as early binding. Calling a virtual method (Pure Polymorphism), decided at a runtime is known as late binding.
12. What is the difference between User Control and Custom Control?Answer: Custom Controls are compiled code (Dlls), easier to use, difficult to create, and can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at design time. Can be used by Multiple Applications (If Shared Dlls), Even if Private can copy to bin directory of web application add reference and use. Normally designed to provide common functionality independent of consuming Application. User Controls are similar to those of ASP include files, easy to create, can not be placed in the toolbox and dragged - dropped from it. A User Control is shared among the single application files.
13. What is the difference between ASP Session State and ASP.Net Session State?
Answer: ASP session state relies on cookies, Serialize all requests from a client, does not survive process shutdown, Can not maintained across machines in a Web farm.
Answer: ASP session state relies on cookies, Serialize all requests from a client, does not survive process shutdown, Can not maintained across machines in a Web farm.
14. What is the difference bettween DataReader and DataSet?Answer: DataReader represents only one database record at a time. You must call the Read() method to fetch each new record from the underlying database table into memory. Each time you call Read() again, the previously fetched record is lost. DataSet is on the other hand, enables you to represent the results of a database query in your server's memory. Because a DataSet provides you with a memory-resident representation of data, you can work with the results of a database query as a whole. DataReader must remain connected to a database table. A DataReader is tied down to its underlying data source. The DataSet object is central to supporting disconnected, and distributed data scenarios with ADO.NET. The DataSet is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source. It might be helpful to think of a DataReader as a forward-only recordset. A DataSet, on the other hand, is similar to a disconnected, client-side, static recordset. DataSets also require more overhead to create and populate than DataReaders.
No comments:
Post a Comment