Thread Safety Singleton

If you are new to design pattern please read my blog on Design Pattern then read about Singleton Design Pattern.So let’s continue about Thread Safety Singleton.There are various ways to implement Singleton Design Pattern. No Thread Safe Thread Safety Thread Safety using Double Check Locking Lazy Instantiation I will write about Thread Safety Singleton here, No … Read more

How to create dynamic HTML tags

How to create HTML tags dynamically? In some cases, there might be a requirement to create HTML tags dynamically. For eg, I will create below HTML structure with C# code. <ul id=”pagelist” runat=”server” class=”pages”> <li class=”active” rel=”page1″>My Page Title1</li> <li rel=”page2″>My Page Title2</li> </ul> <div class=”container” id=”container” runat=”server”> <h3 rel=”page1″></h3> <div id=”page1″>    </div> <h3 … Read more

Singleton Design Pattern vs Static Class in C#

If you are new to design pattern, then read my earlier blog on Design Pattern. We have explored ASP.Net Singleton Design Pattern in earlier blog. This blog will help us to know the differences between Singleton Design Pattern and Static Class in C# The most common questions asked related to Singleton Design Pattern is difference between static … Read more

ASP.Net Singleton Design Pattern

In the previous blog, we have seen about “What is Design Pattern?” Now this is time to explore the types of Design Pattern.Let’s start this with Singleton Design Pattern.Singleton Design pattern belongs to Creational Design Pattern. Singleton Pattern ensures that only one instance of the class exists through out the application life cycle.Singleton design pattern … Read more

Web Service to return data in JSON format

Web services are those services which are available over web to communicate between systems.By default Web Service returns data in XML format, now if the requirement is to return in JSON format then we need to do modification in web method.Below webmethod returns data in JSON format.     [WebMethod]     [ScriptMethod(ResponseFormat = ResponseFormat.Json)]     … Read more

Understanding WCF Bindings

Binding describes that how a client will communicate with WCF service. It tells that what protocol will be used to communicate, as WCF supports various protocols like HTTP, TCP, MSMQ, Named Pipes. Binding determine transport protocol i.e. TCP, HTTP, message exchange format i.e. plain text, XML You may go through to my earlier blogs to … Read more


What is ABC of WCF? WCF service comes into existence with a valid Endpoint.  An endpoint consists of 3 major components. These components are generally refer as ABC of WCF. A- Address (Where) B- Binding (How) C- Contract (What) An address is basically an URL for eg- http://localhost:1001/myservice/testservice.svc Binding describes that how a client will communicate … Read more

First WCF Service Application – WCF Tutorial

In this blog, I will be creating a WCF service application project. If you want to learn WCF from the beginning, please read my earlier blog. Let’s create the first WCF Service Application To create a WCF project open Visual Studio 2012 and select File->New Project. Click on WCF from an installed template (Left area) … Read more

Differences between Stored Procedure and Functions

Very frequent question asked in interview is Differences between Stored Procedure and Functions.Below are the differences between these 2. 1) Functions must return a value. Stored procedure need not be.2) Stored procedures can be called using EXEC command where as Functions can be called from another SQL Statement.3) Stored Procedures are precompiled. Functions are not precompiled.4) Generally Stored procedures are … Read more