Tweet
Hire Me on Freelancer.com
Protected by Copyscape Web Plagiarism Finder

Wednesday 24 October 2012

Mostly asked Asp.Net Interview Qusetion and Answers 3.5 , 4.0 (Part 1)

Asp.net interview, .NET Interview Questions and Answers, asp.net interview questions, asp.net interview questions and answers, C# interview questions and answers, IIS interview questions and answers, sql server interview questions and answers, vb.net interview questions and answers, XML interview questions and answers, Asp.Net 3.5,Asp.Net 4.0,Asp.Net4.5, Asp.Net C#, VB.Net.


1. Difference between Classic ASP and ASP.Net?
Answer:
1.       ASP is Interpreted language based on scripting languages like Jscript or VBScript.
2.       ASP has Mixed HTML and coding logic.
3.       Limited development and debugging tools available.
4.       Limited OOPS support.
5.       Limited session and application state management.
6.       Poor Error handling system.
7.       No in-built support for XML.
8.       No fully distributed data source support.
Where
1.       ASP.Net is supported by compiler and has compiled language support.
2.       Separate code and design logic possible.
3.       Variety of compilers and tools available includes the Visual studio.Net.
4.       Completely Object Oriented.
5.       Complete session and application state management.
6.       Full proof error handling possible.
7.       Full XML Support for easy data exchange.
8.       Fully distributed data source support.

2. What’s the difference between Response? Write () and Response.Output.Write ()?
Answer: Response.Output.Write allows us to write the formatted out put.

3. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Answer:

1.       A Dataset can represent an entire relational database in memory, complete with tables, relations, and views, A Record set cannot.
2.       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.
3.       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.
4.       Datasets have no current record pointer, you can use For Each loops to move through the data. Recordsets have pointers to move through them.
5.       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.
6.       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:

1.       Structures are value type and Classes are reference type.
2.       Structures cannot have constructors or destructors. Classes can have both contractors and destructors.
3.       Structures do not support Inheritance, while Classes support Inheritance.

7. What are the difference between const and readonly?
Answer:

1.       A const cannot be static, while read-only can be static.
2.       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.
3.       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.copy
Answer: 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, cannot 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, serializes all requests from a client, does not survive process shutdown, and cannot maintained across machines in a Web farm.

14. What is the difference between Data Reader and Dataset?
Answer: Data Reader 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. Data Reader must remain connected to a database table. A Data Reader 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 Data Reader as a forward-only record set. A Dataset, on the other hand, is similar to a disconnected, client-side, static record set. Datasets also require more overhead to create and populate than Data Readers.

 Abbreviations
·         CLR = Common Language Runtime
·         CLS = Common Language Specifications
·         CTS = Common Type Specifications
·         GC = Garbage Collector.
·         WSDL = Web Services Description Language.
·         MSIL = Microsoft Intermediate Language.
·         CIL = Common Intermediate Language – MSIL.
·         JIT = Just In Time.
·         PE = Portable Executable – A file format.
·         COFF = Common Object File Format – A file format.
·         GAC = Global Assembly Cache.
·         DDL = Data Definition Language.
·         DML = Data Manipulation Language.
·         CAS = Code Access Security.
·         RCW = Runtime Callable Wrapper.
·         COM = Component Object Model.
·         CCW = COM Callable Wrapper.
·         DOM = Document Object Model.
·         DNA = Distributed internet Applications Architecture.
·         GUID = Globally Unique Identifier.
·         MS-DTC = Microsoft Distributed Transaction Coordinator.
·         OLTP = Online Transaction Processing.
·         OLAP = Online Analytical Processing.
·         RAD = Rapid Application Development.
·         SMTP = Simple Mail Transfer Protocol.
·         SOAP = Simple Object Access Protocol.
·         TCP = Transport Control Protocol.
·         TLB = Type Library.
·         UDF = Uniform Data Format.
·         UDDI = Universal Description, Discovery and Integration.

True/False
1. A Web service can only be written in .NET?
Answer: False (Java also)

2. To test a Web service you must create a windows application or Web application to consume this service?
Answer: False, the web service comes with a test page and it provides HTTP-GET method to test it.

i will appreciate your comments and time for using my blog.
"Necessity is the mother of Invention"

1 comment:

  1. Excellent blog since I have visited is really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative. We are also providing the best services click on below links to visit our website.
    Oracle Fusion HCM Training
    Workday Training
    Okta Training
    Palo Alto Training
    Adobe Analytics Training

    ReplyDelete