Monday, June 23, 2014

Does C# support multiple inheritance?

No, use interfaces instead.

What's the difference between login controls and Forms authentication?

Login controls are an easy way to implement Forms authentication without having to write any code. For example, the Login control performs the same functions you would normally perform when using the FormsAuthentication class—prompt for user credentials, validate them, and issue the authentication ticket—but with all the functionality wrapped in a control that you can just drag from the Toolbox in Visual Studio. Under the covers, the login control uses the FormsAuthentication class (for example, to issue the authentication ticket) and ASP.NET membership (to validate the user credentials). Naturally, you can still use Forms authentication yourself, and applications you have that currently use it will continue to run.

What is .Net Platform?

Microsoft .NET is a software development platform based on virtual machine architecture. Dot Net Platform is:
Language Independent – dot net application can be developed different languages (such as C#, VB, C++, etc.)
Platform Independent – dot net application can be run on any operating system which has .net framework installed.
Hardware Independent – dot net application can run on any hardware configuration
It allows us to build windows based application, web based application, web service, mobile application, etc.

What is Postback?

When an action occurs (like button click), the page containing all the controls within the tag performs an HTTP POST, while having itself as the target URL. This is called Postback.

What is CLR (Common Language Runtime)?

CLR provides a environment in which program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them.
The common Language Runtime (CLR) a rich set of features for cross-language development and deployment. CLR supports both Object Oriented Languages as well as procedural languages. CLR provides security, garbage collection, cross language exception handling, cross language inheritance and so on.

What is Component?

It is a set pre-compiled class, which is reusable. For now, just stick to it at the end of article you will practically understand how it is reusable piece of code.

Difference between managed and unmanaged code?

Managed Code :Code that is executed by the CLR is Managed code
Unmanaged Code :Code that is directly executed by the Operating System, not by CLR is known as un-managed code.

Describe the difference between inline and code behind.

Inline code is written along side the HTML in a page. There is no separate distinction between design code and logic code. Code-behind is code written in a separate file and referenced by the .aspx page

What is a Page Life Cycle of an ASP.Net page?

There are various stages described as under.
Init
LoadViewState
LoadPostBackData
Load
RaisePostBackDataChangedEvent
RaisePostBackEvents
Pre-Render
SaveViewState
Render
Unload

What is serialization?

Serialization is the process of converting an object into a stream of bytes. De-serialization is the opposite process of creating an object from a stream of bytes. Serialization/De-serialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database). There are two separate mechanisms provided by the .NET class library for serialization - XmlSerializer and SoapFormatter and BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting.