Category Archives: Asp.Net

ASP.NET Tutorial for Beginners and Professionals both. Learn ASP.NET in simple and easy way from basic to advanced concepts with well explained examples. ASP.NET is a web framework developed by Microsoft to allow programmers to build web applications easily. It is used to develop websites, web applications and web services.

Interview questions and answers for 3-8 year experience

What is the difference between an abstract class and interface? When would you want to use them? OOP Concepts practical questions example in C# Static Class in C# What are Anonymous methods? What is the difference between Finalize()and Dispose()? What is the difference between ref and out parameters? What is the difference between Var, object… Read More »

Where is View State data stored in asp net?

View State data is stored in a hidden field called “__VIEWSTATE” on a Web page. It stored data in Base64 String encoded format which can be further decoded. Sample hidden field looks like below: <input type=”hidden” name=”__VIEWSTATE” id=”__VIEWSTATE” value=”/wEPDwUKMTM1ODM3Nj…….” /> This single hidden field contains all the viewstate values for all the page controls. You… Read More »

Event vs Delegate

Event and Delegate are interrelated. In this post, we will learn how they are different each other. An Event declaration adds a layer of abstraction and protection on the delegate instance. This protection prevents clients of the delegate from resetting the delegate and its invocation list and only allows adding or removing targets from the… Read More »

Difference between Singleton and Static class

A singleton classes allowed to create a only single instance or particular class. That instance can be treated as normal object. You can pass that object to a method as parameter or you can call the class method with that Singleton object. While static class can have only static methods and you can not pass… Read More »

Difference between throw and throw ex

We can say “throw” maintains the full hierarchy in the stack trace and gives complete information about the exception occurred in the code. Whereas “throw ex” pretends that exceptions occurred on the line where “throw ex” was written and removes all the hierarchy above the method containing the “throw ex” expression.

Difference between IEnumerator and IEnumerable

IEnumerable An enumerable class implements the IEnumerable interface. The IEnumerable interface has only one method GetEnumerator, which returns an IEnumerator interface. public IEnumerator GetEnumerator(); Example:- class Program { static void Main() { List<int> list = new List<int>(); list.Add(1); list.Add(2); list.Add(3); list.Add(4); list.Add(5); List<int>.Enumerator e = list.GetEnumerator(); Write(e); } static void Write(IEnumerator<int> e) { while (e.MoveNext())… Read More »

Anonymous method in C#

Anonymous is a type that doesn’t have any name. Anonymous type allows you to create new type by using the new keyword and object initializer syntax without defining its class. The var is used to hold the reference of anonymous types. The Type of anonymous is generated by c# compiler that is accessible within the… Read More »

Understand Inheritance and Polymorphism with example

In this post, we will understand the Inheritance and Polymorphism concept of OOP’S practically. In most of the interviews, interviewers asked these inheritance questions and trying to confuse you but after reading this post you will easily understand and clear all confusion. When you derive a class from a base class, the derived class will inherit all… Read More »

Connected and Disconnected architecture in ADO.Net

The ADO.NET Framework supports two models of Data Access Architecture, Connection Oriented Data Access Architecture and Disconnected Data Access Architecture. Connected Architecture of ADO.NET In connected architecture, the connection must be opened to access the data retrieved from the database. It was built on the classes connection, command, datareader and transaction. Disconnected Architecture in ADO.NET… Read More »