Latest Basic Dot Net Interview Preparation Guide
Download PDF

Learn Dot Net with hundreds of Dot Net Interview Questions and Answers

116 Dot Net Questions and Answers:

Table of Contents:

Latest  Dot Net Job Interview Questions and Answers
Latest Dot Net Job Interview Questions and Answers

1 :: What should you do to store an object in a Viewstate?

Do serialization of convert the object to string

2 :: What should one do to make class serializable?

To make a class serializable is to mark it with the Serializable attribute as follows.
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
public String str = null;
}

3 :: What is Viewstate in .NET?

A server control’s view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET server controls use this property, which is an instance of the StateBag class, to store the property values.

4 :: What is the use of ErrorProvider Control in .NET?

The ErrorProvider control is used to indicate invalid data on a data entry form. Using this control, you can attach error messages that display next to the control when the data is invalid, as seen in the following image. A red circle with an exclamation point blinks, and when the user mouses over the icon, the error message is displayed as a tooltip.

5 :: What is the Difference Between Response.write & response.output.Write?

In ASP.NET the Response object is of type HttpResponse and when you say Response.Write you’re really saying (basically) HttpContext.Current.Response.Write and calling one of the many overloaded Write methods of HttpResponse. Response.Write then calls .Write() on it’s internal TextWriter object:
public void Write(object obj){ this._writer.Write(obj);}
HttpResponse also has a Property called Output that is of type, yes, TextWriter, so:
public TextWriter get_Output(){ return this._writer; }
Which means you can to the Response whatever a TextWriter will let you. Now, TextWriters support a Write() method ala String.Format, so you can do this:
Response.Output.Write(”Scott is {0} at {1:d}”, “cool”,DateTime.Now);
But internally, of course, this this is happening:
public virtual void Write(string format, params object[] arg)
{
this.Write(string.Format(format, arg));
}

6 :: Which DLL translate XML to SQL in Internet Information Server (IIS)?

Sqlisapi.dll
DLL used to translate XML to SQL in Internet Information Server (IIS)

7 :: Why The JavaScript Validation Not Run on the Asp.Net Button But Run Successfully On The HTML Button?

The Asp.Net Button Is post backed on the server & not yet Submit & when It goes to the server its states is lost So if we r using JavaScript in our application so we always use the Input Button in the asp Button

8 :: When we go for html server controls and when we go for web server controls?

Server controls are a part of ASP.net. When a server control is used there will be an extra overhead on the server to create the control at run time and accordingly set the values. HTML controls are static controls and are easy to use. They are supported is ASP.net.
As a rule, if there is a corresponding HTML control available instead of the server control, you should always go for the HTML control as it enhances the server performance and ensures faster response. Server controls should be used when it is found that the available HTML controls are not sufficient to achieve the task.

9 :: what is the difference between user control an custom control? advantages/disadvantages?

Web user controls Vs Web custom controls Easier to create Vs Harder to create
Limited support for consumers who use a visual design tool Vs Full visual design tool support for consumers
A separate copy of the control is required in each application Vs Only a single copy of the control is required, in the global assembly cache
Cannot be added to the Toolbox in Visual Studio Vs Can be added to the Toolbox in Visual Studio
Good for static layout Vs Good for dynamic layout


http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/vbcon/html/vbconwebusercontrolsvscustomwebcontrols.asp

10 :: Which dll is required to translate XML to SQL in Internet Information Server (IIS)?

Microsoft.data.sqlxml.dll used to translate XML to SQL using Internet Information Server IIS

11 :: What is connection pooling and how do you make your application use it?

Opening database connection is a time consuming operation. Connection pooling increases the performance of the applications by reusing the active database connections instead of create new connection for every request.
Connection pooling Behavior is controlled by the connection string parameters.
Following the the 4 parameters that control most of the connection pooling behavior.
1. Connect Timeout
2. Max Pool Size
3. Min Pool Size
4. Pooling
Please go through the following link as well
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q169470

12 :: What is Delegate and what is it used for?

Delegate is kinda like a pointer to a function in C++ or like an event handler in Java
You can use it to “multicast” which means running multiple functions in different instances of object already created.
This is useful when you want your objects to “register” to an event raised by another object.
The way it works is the object you are registered to listen to receives the delegate of the function it is supposed to run in your object, the delegate is then run from it. (if you switch the word delegate for pointer, this would be much simpler)

13 :: What is IIS? Have you used it?

IIS - Internet Information Server
IIS is used to access the ASP.Net web applications
Yes, I used in ASP.NET web applications.

14 :: What is .NET?

.NET is essentially a framework for software development.It is similar in nature to any other software development framework (J2EE etc) in that it provides a set of runtime containers/capabilities, and a rich set of pre-built functionality in the form of class libraries and APIs
The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET.
Response object allows the server to communicate with the client(browser). It is useful for displaying information to the user (or) redirecting the client.
Eg: Response.Write(”Hello World”)

16 :: What is serialization, how it works in .NET?

Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage.
Serialization is used to save session state in ASP.NET.
Serialization is to copy objects to the Clipboard in Windows Forms
Serialization is used by remoting to pass objects by value from one application domain to another

17 :: ASP.NET interview questions list only?

1. Describe the difference between a Thread and a Process?
2. What is a Windows Service and how does its lifecycle differ from a .standard. EXE?
3. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4. What is the difference between an EXE and a DLL?
5. What is strong-typing versus weak-typing? Which is preferred? Why?
6. What.s wrong with a line like this? DateTime.Parse(myString
7. What are PDBs? Where must they be located for debugging to work?
8. What is cyclomatic complexity and why is it important?
9. Write a standard lock() plus double check to create a critical section around a variable access.
10. What is FullTrust? Do GAC’ed assemblies have FullTrust?
11. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12. What does this do? gacutil /l | find /i about
13. What does this do? sn -t foo.dll
14. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15. Contrast OOP and SOA. What are tenets of each
16. How does the XmlSerializer work? What ACL permissions does a process using it require?
17. Why is catch(Exception) almost always a bad idea?
18. What is the difference between Debug.Write and Trace.Write? When should each be used?

18 :: What is the base class of Button control in .NET?

Listing from visual studio .net > Button Class System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ButtonBase
System.Windows.Forms.Button

19 :: What is the base class of .NET?

Base class provides a base set of methods that all derived classes can use

20 :: Main differences between ASP and ASP.NET?

1. ASP: Code is Interpreted
ASP.NET: Code is Compiled

2. ASP: Business Logic and Presentation Logic are in a single file
ASP.NET: Business Logic and Presentation Logic are in separate files (.cs or .vb) and (.aspx) respectively.
3. ASP: No Web Server Controls
ASP.NET: Web Server Controls supported by strong .NET Framework
4. ASP: No RAD in Classic ASP
ASP.NET: Supports RAD

21 :: Name some of the languages .NET support?

Some of the languages that are supported by .NET
1. Visual Basic.NET
2. Visual C#
3. Visual C++

22 :: .NET framework overview?

1. Has own class libraries. System is the main namespace and all other namespaces are subsets of this.
2. It has CLR(Common language runtime, Common type system, common language specification)
3. All the types are part of CTS and Object is the base class for all the types.
4. If a language said to be .net complaint, it should be compatible with CTS and CLS.
5. All the code compiled into an intermediate language by the .Net language compiler, which is nothing but an assembly.
6. During runtime, JIT of CLR picks the IL code and converts into PE machine code and from there it processes the request.
7. CTS, CLS, CLR
8. Garbage Collection
9. Dispose, finalize, suppress finalize, Idispose interface
10. Assemblies, Namespace: Assembly is a collection of class/namespaces. An assembly contains Manifest, Metadata, Resource files, IL code
11. Com interoperability, adding references, web references
12. Database connectivity and providers

23 :: What do you know about ADO.NET’s objects and methods?

ADO.NET provides consistent access to data sources such as Microsoft SQL Server, as well as data sources exposed through OLE DB and XML.
Data-sharing consumer applications can use ADO.NET to connect to these different data sources and retrieve, manipulate, and update data.
ADO.NET provides first-class support for the disconnected, n-tier programming environment for which many new applications are written.

25 :: What is CLR in .NET?

CLR(Common Language Runtime) is the main resource of .Net Framework. it is collection of services like garbage collector, exception handler, jit compilers etc. with the CLR cross language integration is possible.
Dot Net Interview Questions and Answers
116 Dot Net Interview Questions and Answers