November 6, 2018

Sreekanth B

CDW Most Frequently Asked Latest ASP.NET Interview Questions Answers

How Does Assembly Versioning Work?

Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version of the referenced assembly.The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with either of the first two parts different are normally viewed as incompatible. If the first two parts are the same, but the third is different, the assemblies are deemed as 'maybe compatible'. If only the fourth part is different, the assemblies are deemed compatible. However, this is just the default guideline - it is the version policy that decides to what extent these rules are enforced. The version policy can be specified via the application configuration file.

What Is Garbage Collection?

Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.

Why Doesn't The .net Runtime Offer Deterministic Destruction?

Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next sweep of the heap.

Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.

Is The Lack Of Deterministic Destruction In .net A Problem?

It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way for the client to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this.
CDW Most Frequently Asked Latest ASP.NET Interview Questions Answers
CDW Most Frequently Asked Latest ASP.NET Interview Questions Answers

What Is The Use Of Jit ?

JIT (Just - In - Time) is a compiler which converts MSIL code to native code, Because the common language runtime supplies a JIT compiler for each supported CPU architecture, developers can write a set of MSIL that can be JIT-compiled and run on computers with different architectures. However, your managed code will run only on a specific operating system if it calls platform-specific native APIs, or a platform-specific class library.

JIT compilation takes into account the fact that some code might never get called during execution. Rather than using time and memory to convert all the MSIL in a portable executable (PE) file to native code, it converts the MSIL as needed during execution and stores the resulting native code so that it is accessible for subsequent calls. The loader creates and attaches a stub to each of a type's methods when the type is loaded. On the initial call to the method, the stub passes control to the JIT compiler, which converts the MSIL for that method into native code and modifies the stub to direct execution to the location of the native code. Subsequent calls of the JIT-compiled method proceed directly to the native code that was previously generated, reducing the time it takes to JIT-compile and run the code.

What Is Delay Signing?

Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.

What Is The Difference Between Response.write() And Response.output.write()?

Response.Output.Write() allows you to write formatted output.

Should User Input Data Validation Occur Server-side Or Client-side? Why?

All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.

What Is Msil, And Why Should Developers Need An Appreciation Of It If At All?

MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.

What Does The "enableviewstate" Property Do? Why Would I Want It On Or Off?

It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.

What Is The Difference Between Value Types And Reference Types?

Value Types uses Stack to store the data where as the later uses the Heap to store the data.

What Are User Controls And Custom Controls?

Custom controls: A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.

User Controls: In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class.

What Are The Validation Controls?

A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

Where Do You Add An Event Handler?

It is the Attributesproperty, the Add function inside that property. e.g. btnSubmit.Attributes.Add ("onMouse Over" ,"someClientCode();")

What Data Type Does The Rangevalidator Control Support?

Integer,String and Date.

What Is The Implicit Name Of The Parameter That Gets Passed Into The Class Set Method?

Value, and its datatype depends on whatever variable we are changing.

How Do You Inherit From A Class In C#?

Place a colon and then the name of the base class. Notice that it’s double colon in C++.

Does C# Support Multiple Inheritance?

No,

use interfaces instead.

When You Inherit A Protected Class-level Variable, Who Is It Available To?

Classes in the same namespace.

Are Private Class-level Variables Inherited?

Yes,

but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are.

Subscribe to get more Posts :