<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9021416783634608729</id><updated>2012-02-17T02:00:25.326+05:30</updated><title type='text'>Tech Note from Bhargava Pandey</title><subtitle type='html'>Smart Tips and Trick related to Microsoft Technology,  Networking, Cell Phone, VHDL, Verilog, HTML, JavaScript, Web Page designing. SQL Server, SSRS, SSIS, SSAS</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.bhargavapandey.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default?start-index=26&amp;max-results=25'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-43804472304572711</id><published>2011-12-21T14:21:00.002+05:30</published><updated>2011-12-21T15:37:45.741+05:30</updated><title type='text'>.NET Web Application with SQL Azure</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;h1&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;.NET Web Application with SQL Azure&lt;/span&gt;&lt;/h1&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Developing for Windows Azure is easy using Visual Studio 2010 and the free Windows Azure SDK for .NET. If you do not already have Visual Studio 2010, the SDK will automatically install Visual Web Developer 2010 Express, so you can start developing for Windows Azure entirely for free. This guide assumes you have no prior experience using Windows Azure. On completing this guide, you will have an application that uses multiple Windows Azure resources up and running in the cloud.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You will learn:&lt;/span&gt;&lt;br /&gt;&lt;ul sizcache="0" sizset="46"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;How to enable your machine for Windows Azure development with a single download and install &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;How to create and modify a Visual Studio ASP.NET MVC 3 project so it can run on Windows Azure &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;How to use a SQL Azure database to store data in the cloud &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;How to deploy and update your application to Windows Azure &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You will build a to-do list web application that runs in Windows Azure and stores its data in SQL Azure. The application is hosted in an instance of a Web role that, when running in the cloud, is itself hosted in a dedicated virtual machine (VM). A screenshot of the completed application is below:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="236" src="https://www.windowsazure.com/media/net/dev-net-getting-started-1.png" width="400" /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;SETTING UP THE DEVELOPMENT ENVIRONMENT&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Before you can begin developing your Windows Azure application, you need to get the tools and set-up your development environment.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="50"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To install the Windows Azure SDK for .NET, click the button below:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="60" src="https://www.windowsazure.com/media/net/dev-net-getting-started-2.png" width="200" /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;When prompted to run or save WindowsAzureSDKForNet.exe, click Run:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="51" src="https://www.windowsazure.com/media/net/dev-net-getting-started-3.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click on Install in the installer window and proceed with the installation:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="276" src="https://www.windowsazure.com/media/net/dev-net-getting-started-4.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Once the installation is complete, you will have everything necessary to start developing. The SDK includes tools that let you easily develop Windows Azure applications in Visual Studio. If you do not have Visual Studio installed, it also installs the free Visual Web Developer Express.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;CREATING AN ASP.NET MVC 3 APPLICATION&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;CREATING THE PROJECT&lt;/span&gt;&lt;/h3&gt;&lt;ol sizcache="0" sizset="53"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Use administrator privileges launch either Microsoft Visual Studio 2010 or Microsoft Visual Web Developer Express 2010. To launch Visual Studio with administrator privileges, right-click Microsoft Visual Studio 2010 (or Microsoft Visual Web Developer Express 2010) and then click Run as administrator. The Windows Azure compute emulator, discussed later in this guide, requires that Visual Studio be launched with administrator privileges.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Visual Studio, on the File menu, click New, and then click Project.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="255" src="https://www.windowsazure.com/media/net/dev-net-getting-started-5.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;From Installed Templates, under Visual C#, click Web and then click ASP.NET MVC 3 Web Application. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Name the application ToDoListApp and click OK:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="203" src="https://www.windowsazure.com/media/net/dev-net-getting-started-6.png" width="320" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In the New ASP.NET MVC 3 Project dialog, select the Internet Application template and the Razor view engine. Click OK. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;MODIFY UI TEXT WITHIN YOUR APPLICATION&lt;/span&gt;&lt;/h3&gt;&lt;ol sizcache="0" sizset="57"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, under Views\Shared open the _Layout.cshtml file.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="345" src="https://www.windowsazure.com/media/net/dev-net-getting-started-7.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Within the body tag, find the title of the page enclosed in h1 tags. Change the title text from My MVC Application to To Do List. Here is where you type this in:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-8.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;RUN YOUR APPLICATION LOCALLY&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Run the application to verify that it works.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="59"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Within Visual Studio, press F5.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Your application should appear running in a browser:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="393" src="https://www.windowsazure.com/media/net/dev-net-getting-started-9.png" width="640" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;MAKING YOUR APPLICATION READY TO DEPLOY TO WINDOWS AZURE&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Now, you will prepare your application to run in a Windows Azure hosted service. Your application needs to include a Windows Azure deployment project before it can be deployed to the cloud. The deployment project contains configuration information that is needed to properly run your application in the cloud.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="61"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To make your app deployable to the cloud, right click on the ToDoListApp project in Solution Explorer and click Add Windows Azure Deployment Project:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-10.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To enable the built-in membership provider you must use the ASP.NET Universal Providers. This provider enables the account management capabilities in your application. In Solution Explorer, right click on ToDoListApp and then click &lt;strong&gt;Manage NuGet Packages...&lt;/strong&gt; (or &lt;strong&gt;Add Library Package Reference...&lt;/strong&gt; in older versions of NuGet):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="289" src="https://www.windowsazure.com/media/net/dev-net-getting-started-27-1.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In the &lt;strong&gt;ToDoListApp – Manage NuGet Packages&lt;/strong&gt; dialog, in the top right corner within the &lt;strong&gt;Search Online&lt;/strong&gt; field, write &lt;strong&gt;"universal providers"&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="222" src="https://www.windowsazure.com/media/net/dev-net-getting-started-27-2.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Select the &lt;strong&gt;"ASP.NET Universal Providers"&lt;/strong&gt; and click &lt;strong&gt;Install&lt;/strong&gt;. Close the &lt;strong&gt;ToDoListApp – Manage NuGet Packages&lt;/strong&gt; dialog after installation is complete.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, open the Web.config file in the root directory of the ToDoListApp project.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Under the &amp;lt;configuration&amp;gt; / &amp;lt;connectionStrings&amp;gt; section replace theDefaultConnection connection stringas shown below.&lt;/span&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="pln"&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;add&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"DefaultConnection"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;connectionString&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"Data Source=.\SQLEXPRESS;Initial Catalog=aspnet_ToDoListApp;Integrated Security=True;MultipleActiveResultSets=True"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;providerName&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"System.Data.SqlClient"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To test your application, press F5.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;This will start the Windows Azure compute emulator. The compute emulator uses the local computer to emulate your application running in Windows Azure. You can confirm the emulator has started by looking at the system tray:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-10a.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;A browser will still display your application running locally, and it will look and function the same way it did when you ran it earlier as a regular ASP.NET MVC 3 application.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="246" src="https://www.windowsazure.com/media/net/dev-net-getting-started-11.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;DEPLOYING YOUR APPLICATION TO WINDOWS AZURE&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You can deploy your application to Windows Azure either through the portal or directly from within Visual Studio. This guide shows you how to deploy your application from within Visual Studio.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In order to deploy your application to Windows Azure, you need an account. If you do not have one you can create a free trial account. Once you are logged in with your account, you can download a Windows Azure publishing profile. The publishing profile will authorize your machine to publish packages to Windows Azure using Visual Studio.&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;CREATING A WINDOWS AZURE ACCOUNT&lt;/span&gt;&lt;/h3&gt;&lt;ol sizcache="0" sizset="70"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Open a web browser, and browse to &lt;/span&gt;&lt;a href="http://www.windowsazure.com/"&gt;&lt;span style="color: #4a91ac; font-family: Verdana, sans-serif; font-size: x-small;"&gt;http://www.windowsazure.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To get started with a free account, click &lt;strong&gt;free trial &lt;/strong&gt;in the upper right corner and follow the steps.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="266" src="https://www.windowsazure.com/media/net/dev-net-getting-started-12.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Your account is now created. You are ready to deploy your application to Windows Azure!&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;PUBLISHING THE APPLICATION&lt;/span&gt;&lt;/h3&gt;&lt;ol sizcache="0" sizset="72"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Right click on the ToDoListApp project in Solution Explorer and click Publish to Windows Azure.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="218" src="https://www.windowsazure.com/media/net/dev-net-getting-started-13.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li sizcache="0" sizset="74"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The first time you publish, you will first have to download credentials via the provided link.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="74"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click &lt;strong&gt;Sign in to download credentials&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="270" src="https://www.windowsazure.com/media/net/dev-net-getting-started-14.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Sign-in using your Live ID:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="320" src="https://www.windowsazure.com/media/net/dev-net-getting-started-15.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Save the publish profile file to a location on your hard drive where you can retrieve it:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="320" src="https://www.windowsazure.com/media/net/dev-net-getting-started-16.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Within the publish dialog, click on Import Profile:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="270" src="https://www.windowsazure.com/media/net/dev-net-getting-started-17.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Browse for and select the file that you just downloaded, then click Next.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Pick the Windows Azure subscription you would like to publish to:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="269" src="https://www.windowsazure.com/media/net/dev-net-getting-started-18.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;If your subscription doesn’t already contain any hosted services, you will be asked to create one. The hosted service acts as a container for your application within your Windows Azure subscription. Enter a name that identifies your application and choose the region for which the application should be optimized. (You can expect faster loading times for users accessing it from this region.)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="270" src="https://www.windowsazure.com/media/net/dev-net-getting-started-19.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Select the hosted service you would like to publish your application to. Keep the defaults as shown below for the remaining settings. Click Next:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="270" src="https://www.windowsazure.com/media/net/dev-net-getting-started-20.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;On the last page, click Publish to start the deployment process:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="270" src="https://www.windowsazure.com/media/net/dev-net-getting-started-21.png" width="400" /&gt; &lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;This will take approximately 5-7 minutes. Since this is the first time you are publishing, Windows Azure provisions a virtual machine (VM), performs security hardening, creates a Web role on the VM to host your application, deploys your code to that Web role, and finally configures the load balancer and networking so you application is available to the public.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;While publishing is in progress you will be able to monitor the activity in the Windows Azure Activity Log window, which is typically docked to the bottom of Visual Studio or Visual Web Developer:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="206" src="https://www.windowsazure.com/media/net/dev-net-getting-started-23.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;When deployment is complete, you can view your website by clicking the Website URL link in the monitoring window:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="84" src="https://www.windowsazure.com/media/net/dev-net-getting-started-24.png" width="400" /&gt; &lt;img height="243" src="https://www.windowsazure.com/media/net/dev-net-getting-started-25.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;ADDING SQL DATABASE SUPPORT&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The Windows Azure platform offers two primary storage options:&lt;/span&gt;&lt;br /&gt;&lt;ul sizcache="0" sizset="85"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Windows Azure Storage Services provide non-relational data storage in the form of blobs and tables. It is fault-tolerant, highly available, and will scale automatically to provide practically unlimited storage.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;SQL Azure provides a cloud-based relational database service that is built on SQL Server technologies. It is also fault-tolerant and highly available. It is designed so the tools and applications that work with SQL Server also work with SQL Azure. A SQL Azure database can be up to 100GB in size, and you can create any number of databases.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;This guide uses a SQL Azure database to store data, however the application could also be constructed using Windows Azure Storage. For more information about SQL Azure and Windows Azure Storage, see &lt;/span&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/data-storage-offerings-on-the-windows-azure-platform.aspx"&gt;&lt;span style="color: #4a91ac; font-family: Verdana, sans-serif; font-size: x-small;"&gt;Data Storage Offerings on the Windows Azure Platform.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;CREATING CLASSES FOR THE DATA MODEL&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You will use the Entity Framework Code First feature to create and set-up a database schema for your application. Code First lets you write standard classes that the Entity Framework will use to create your database and tables automatically.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="87"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, right click on Models and click Add and then Class.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In the Add New Item dialog, in the Name field type ToDoModels.cs, and then click Add.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Replace the contents of the ToDoModels.cs file with the code below. This code defines the structure of your ToDoItem class, which will be mapped to a database table. It also creates a database context class that will allow you to perform operations on the ToDoItem class.&lt;/span&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;System&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;System&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Collections&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Generic&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;System&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Linq&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;System&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Web&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;using&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;System&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Data&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Entity&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;namespace&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoListLib&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Models&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoItem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoItemId&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;string&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;Name&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;IsComplete&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoDb&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;DbContext&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;DbSet&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoItem&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="typ"&gt;&lt;span style="color: #660066;"&gt;ToDoItemEntries&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;get&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="kwd"&gt;&lt;span style="color: #000088;"&gt;set&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600; font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;That’s all the Entity Framework needs to create your database and a table called ToDoItem.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, right click on ToDoListApp and select Build to build your project.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;CREATING SCAFFOLDING TO CREATE/READ/UDPDATE/DELETE TO DO ITEMS&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;ASP.NET MVC makes it easy to build an application that performs the main database access operations. The scaffolding feature will generate code that uses the model and data context you created earlier to perform CRUD (create, read, update, delete) actions.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="91"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, right-click on Controllers and click Add and then click Controller.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="198" src="https://www.windowsazure.com/media/net/dev-net-getting-started-26.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In the Add Controller window, enter HomeController as your Controller name, and select the Controller with read/write actions and views, using Entity Framework template. Scaffolding will also write code that uses a model and a data context. Select ToDoItem as your model class and ToDoDb as your data context class, as shown in the screenshot below:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="254" src="https://www.windowsazure.com/media/net/dev-net-getting-started-27.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click Add.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You will see a message indicating that HomeController.cs already exists. Select both the Overwrite HomeController.cs and Overwrite associated views checkboxes and click OK.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;This will create a controller and views for each of the four main database operations (create, read, update, delete) for ToDoItem objects.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Solution Explorer, open the Web.config file in the root directory of the ToDoListApp project.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Under the &amp;lt;configuration&amp;gt; / &amp;lt;connectionStrings&amp;gt; section add the &lt;strong&gt;ToDoDb connection&lt;/strong&gt; string as shown below.&lt;/span&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="pln"&gt;    &lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;add&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"ToDoDb"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;connectionString&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=ToDoDb;User Instance=true;MultipleActiveResultSets=True"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="atn"&gt;&lt;span style="color: #660066;"&gt;providerName&lt;/span&gt;&lt;/span&gt;&lt;span class="pun"&gt;&lt;span style="color: #666600;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class="atv"&gt;&lt;span style="color: #008800;"&gt;"System.Data.SqlClient"&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt; &lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;To test your application at this stage, press F5 in Visual Studio to run the application in the compute emulator. When your application first runs, a database will be created in your local SQL Server Express instance, which was installed as part of the Windows Azure SDK.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="250" src="https://www.windowsazure.com/media/net/dev-net-getting-started-28.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Clicking the Create New link on the web page that is displayed in the browser will create new entries in the database.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;SET-UP SQL AZURE&lt;/span&gt;&lt;/h3&gt;&lt;ol sizcache="0" sizset="100"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The next step is to configure your application to store data in the cloud. First, you must create a SQL Azure server. Login to the Windows Azure Platform Management Portal, http://windows.azure.com, and click on Database:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="400" src="https://www.windowsazure.com/media/net/dev-net-getting-started-29.png" width="358" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;On the top of the left pane, click the subscription associated with your SQL Azure account:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="285" src="https://www.windowsazure.com/media/net/dev-net-getting-started-30.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;From the top menu, click Create.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;In Create Server, select the region for which you want database access to be optimized, and then click Next:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-31.png" /&gt; &lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;IMPORTANT: Pick the same region that you choose earlier when deploying your application. This will give you the best performance.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Choose an administrator username and password.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; These are the credentials for your administrative account and give you full access to all databases on the server.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click Next.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The next dialog will prompt you to create firewall rules for the server. Firewall rules identify specific IP addresses or ranges of IP addresses that are able to communicate directly with your SQL Azure server. Add a new rule by clicking Add. In the Add Firewall Rule dialog, enter the values shown in the table below. This will enable your local application to communicate with SQL Azure, but will block other IP addresses from communicating directly with your server.&lt;/span&gt;&lt;br /&gt;&lt;table border="2" cellpadding="5" cellspacing="0" style="border-bottom: #000000 2px solid; border-left: #000000 2px solid; border-right: #000000 2px solid; border-top: #000000 2px solid;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Name&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Value&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Rule name&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;local development environment&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;IP range start&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;(Type the IP address of the computer you are using. The IP address is listed at the bottom of the dialog.)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;IP range end&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;(Type the IP address of the computer you are using.)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click OK.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Select the Allow other Windows Azure services to access this server check box, Note: SQL Azure has two types of access control: firewall and SQL authentication. You must configure the SQL Azure firewall settings to allow connections from your computer(s).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Important:&lt;/strong&gt; In addition to configuring the SQL Azure server-side firewall, you must also configure your client-side environment to allow outbound TCP connections over TCP port 1433. For more information, see &lt;/span&gt;&lt;/span&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/security-guidelines-for-sql-azure.aspx"&gt;&lt;span style="color: #4a91ac; font-family: Verdana, sans-serif; font-size: x-small;"&gt;Security Guidelines for SQL Azure&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-32.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click Finish.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You will now see an entry for your new server in the left menu. The fully qualified domain name of the server uses the following format:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;lt;ServerName&amp;gt;.database.windows.net&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Where &amp;lt;ServerName&amp;gt; identifies the server. Write down the server name; you will need it later in the tutorial.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;You can use either SQL Server Management Studio or Windows Azure Platform Management Portal to manage your SQL Azure database. To connect to SQL Azure from SQL Server Management Studio, you must provide the fully qualified domain name of the server: &amp;lt;ServerName&amp;gt;.database.windows.net.&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;SET-UP YOUR APPLICATION TO USE THE DATABASE&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Often times, you want to use a different database locally that you use in production. Visual Studio makes this easy. You can have your Web.config vary between your development machine and cloud deployment by creating a transform in Web.Release.config. In this guide, you will edit the Web.Release.config to use SQL Azure instead of your local SQL Server when deployed to the cloud:&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="112"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Back in Visual Studio or Visual Web Developer, in Solution Explorer, open the Web.Release.config file located under Web.config in the root directory of the ToDoListApp project.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-33.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Under the &amp;lt;configuration&amp;gt; / &amp;lt;connectionStrings&amp;gt; section replace all items as shown below. Substitute the &amp;lt;serverName&amp;gt; placeholder with the name of the server you created. For &amp;lt;user&amp;gt; and &amp;lt;password&amp;gt;, enter the administrative user and password you created earlier.&lt;/span&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088; font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;lt;connectionStrings&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;  &amp;lt;add name="ToDoDb" connectionString="data source=&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;serverName&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;.database.windows.net;Initial Catalog=ToDoDb;User ID=&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;user&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;@&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;serverName&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;;Password=&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;password&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="pln"&gt;;Encrypt=true;Trusted_Connection=false;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/&amp;gt;&lt;br /&gt;  &amp;lt;add name="DefaultConnection" connectionString="data source=&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;serverName&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;.database.windows.net;Initial Catalog=ToDoDb;User ID=&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;user&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;@&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;serverName&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln"&gt;;Password=&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;password&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span class="pln"&gt;;Encrypt=true;Trusted_Connection=false;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="tag"&gt;&lt;span style="color: #000088;"&gt;&amp;lt;/connectionStrings&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; The administrative user has access to all the databases on the server. To create a SQL Azure user with more restricted pemissions, follow the steps in &lt;/span&gt;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/10028038.aspx"&gt;&lt;span style="color: #4a91ac; font-family: Verdana, sans-serif; font-size: x-small;"&gt;Adding Users to Your SQL Azure Database&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;. Then, modify the above connection string to use the newly created user and password instead of the administrative user and password.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;RUN YOUR APPLICATION IN THE CLOUD&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Now, for the final step, you will test your app both living in the Windows Azure cloud and accessing the SQL Azure cloud database. You will redeploy your application to Windows Azure:&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="114"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Confirm that the correct publishing profile is still selected and click Publish. In particular, ensure that the Build Configuration is set to Release, so you pick up the SQL Azure connection string from the Web.Release.Config that you edited earlier.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-35.png" /&gt; &lt;/span&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Clicking Publish will perform an in-place update, so this will complete faster than your initial deployment.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;When deployment completes, open the URL of your app from the deployment monitor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="84" src="https://www.windowsazure.com/media/net/dev-net-getting-started-36.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Check that your application functions as expected:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="274" src="https://www.windowsazure.com/media/net/dev-net-getting-started-37.png" width="400" /&gt; &lt;img height="274" src="https://www.windowsazure.com/media/net/dev-net-getting-started-38.png" width="400" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The application is now fully running in the cloud. It uses SQL Azure to store its data, and it is running on one small web role instance. One of the benefits the cloud provides over running this application under standard web hosting is the ability to dynamically scale the number of instances as demand changes. This scaling will require no changes to the application itself. Moreover, updates can be deployed without service interruptions as Azure ensures there is always a role instance handling user requests while another one is being updated.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;STOP AND DELETE YOUR APPLICATION&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;After deploying your application, you may want to disable it so you can use build and deploy other applications within the free 750 hours/month (31 days/month) of server time.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Windows Azure bills web role instances per hour of server time consumed. Server time is consumed once your application is deployed, even if the instances are not running and are in the stopped state. A free account includes 750 hours/month (31 days/month) of dedicated virtual machine server time for hosting these web role instances.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;The following steps show you how to stop and delete your application.&lt;/span&gt;&lt;br /&gt;&lt;ol sizcache="0" sizset="118"&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Login to the Windows Azure Platform Management Portal, http://windows.azure.com, and click on Hosted Sevices, Storage Accounts &amp;amp; CDN, then Hosted Services:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img src="https://www.windowsazure.com/media/net/dev-net-getting-started-39.png" /&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Click on Stop to temporarily suspend your application. You will be able to start it again just by clicking on Start. Click on Delete to completely remove your application from Windows Azure with no ability to restore it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img height="183" src="https://www.windowsazure.com/media/net/dev-net-getting-started-40.png" width="400" /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-43804472304572711?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bhargavapandey.com/feeds/43804472304572711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.bhargavapandey.com/2011/12/net-web-application-with-sql-azure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/43804472304572711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/43804472304572711'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/12/net-web-application-with-sql-azure.html' title='.NET Web Application with SQL Azure'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2103982172596113479</id><published>2011-10-15T15:40:00.000+05:30</published><updated>2011-10-15T15:40:57.922+05:30</updated><title type='text'>How to Resolve The name 'xxx' does not exist in the current context  Issue</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Yesterday I was working on a page which contains Ajax Toolkit Tab Container, and there were some control on the other tab.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;When i build my ASP.NET (C#) project in Visual Studio 2010, i started getting this error message &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;"&lt;b&gt;The name 'XXXX' does not exist in the current context&lt;/b&gt;" &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Displayed and the problem is in my .aspx page. Most surprisingly I can access the control in Intellisens but while compile time it throw error. My code definitely has no problem. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;After debugging and searching for a while, i noticed that problem is cause by the back up copy of the same aspx file (copy of xxxx.aspx) that i forget to exclude from the project. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;The problem solved after i exclude the file from the project.&lt;/span&gt;&lt;span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2103982172596113479?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bhargavapandey.com/feeds/2103982172596113479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.bhargavapandey.com/2011/10/how-to-resolve-name-xxx-does-not-exist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2103982172596113479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2103982172596113479'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/10/how-to-resolve-name-xxx-does-not-exist.html' title='How to Resolve The name &apos;xxx&apos; does not exist in the current context  Issue'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-7641373035909495260</id><published>2011-09-25T16:45:00.026+05:30</published><updated>2011-09-25T17:15:57.917+05:30</updated><title type='text'>Itrarting Bewteen Date Range using Foreach C#.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;There are some situation when we want to itrate trough a range of date. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;Hear is ample how you can itrates through the date range using foreach in C#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;for itrating you will need to first create a function which will convert the date range in inumaration formate so that you can itrates. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: x-small;"&gt;For this i have created the follwing function.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;public&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;IEnumerable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&amp;gt; EachDay(&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; from, &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #2b91af; font-family: Consolas; font-size: x-small;"&gt;DateTime&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; thru) &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;{ &lt;br /&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; day = from.Date; day.Date &amp;lt;= thru.Date; day = day.AddDays(1)) &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;yield&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; day; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;Now you can use the code like this.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;foreach (DateTime day in EachDay(strartDate, EndDate)&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;//Do something&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-7641373035909495260?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bhargavapandey.com/feeds/7641373035909495260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.bhargavapandey.com/2011/09/itrarting-bewteen-data-range-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/7641373035909495260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/7641373035909495260'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/09/itrarting-bewteen-data-range-using.html' title='Itrarting Bewteen Date Range using Foreach C#.'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-4315997130370958733</id><published>2011-09-20T20:41:00.001+05:30</published><updated>2011-09-25T16:39:39.904+05:30</updated><title type='text'>Hosting WCF Service in IIS</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Create a WCF service&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;1.&lt;/strong&gt; Create a blank solution and add a WCF Service Library project to it. For the purpose of this post, I am going to create a simple GreetingService that has a method Greet. This method accepts a single parameter name and returns a string “Hello “ appended to name&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-6zxcNLd4tWU/Tnirmb-ziiI/AAAAAAAABNU/JJbwxENqHg4/s1600/Img1_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="124px" src="http://3.bp.blogspot.com/-6zxcNLd4tWU/Tnirmb-ziiI/AAAAAAAABNU/JJbwxENqHg4/s320/Img1_o.jpg" width="236px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;2.&lt;/strong&gt; The following is the code for the GreetingService WCF service. We define a service contract, mark the operations in that contract that are going to be exposed to the external world and then implement the service.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System.Collections.Generic;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System.Text;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System.ServiceModel;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;namespace Wcf.Samples.ServiceLibrary&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ServiceContract()]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public interface IGreeting&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [OperationContract()]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string Greet(string name);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;GreetingService.cs&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System.Collections.Generic;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;using System.Text;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;namespace Wcf.Samples.ServiceLibrary&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; public class GreetingService : IGreeting &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region IGreeting Members&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Greet(string name)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Hello - " + name;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;3.&lt;/strong&gt; Now that you added the service contract and its implementation (the GreetingService), build the project.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Host the service in IIS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;1.&lt;/strong&gt; Now we create a Web site that will host the WCF service that we created in the previous section. For this, right-click the solution in the solution explorer and from the context menu, select Add -&amp;gt; New Web site -&amp;gt;WCF Service as shown in the following figure.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MCkUVZxBzGs/TnisEbieknI/AAAAAAAABNY/wKWoZo29spg/s1600/img2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="208px" rba="true" src="http://3.bp.blogspot.com/-MCkUVZxBzGs/TnisEbieknI/AAAAAAAABNY/wKWoZo29spg/s320/img2.jpg" width="320px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;2.&lt;/strong&gt; This will create a WCF Service Web site into your solution along with the standard folders that get created for a Web site project (App_Code, App_Data etc). A new type of file called Service.svc will be generated and placed into the root of the Web site project, along with the corresponding code-behind file (Service.cs). The Service.cs is provided to implement a WCF service, which then can be referred in the Service.svc file. Since we already have created the WCF service in a separate assembly, we will refer to it in the Service.svc. As such we don’t need Service.cs and hence, it can be deleted.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;3.&lt;/strong&gt; Open Service.svc file and modify the single line in it like this:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;4.&lt;/strong&gt; In the above statement we point to the fully-qualified class name that implements the service that we want to host in IIS.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;5.&lt;/strong&gt; Add the reference of the Wcf.Samples.ServiceLibrary project to the web-site project and build the web-site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;6.&lt;/strong&gt; This completes the creation of WCF service. Now, in order to let the service communicate with the external world, we need to define the communication behavior of the service. For defining this behavior, we will use the Service Configuration tool that comes along with Visual Studio 2005.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;7.&lt;/strong&gt; From the main menu of Visual Studio 2005, select Tools -&amp;gt; WCF Service Configuration Editor. The WCF Configuration Editor window will open up. Select File -&amp;gt; Open -&amp;gt; Config File… from the main menu. Browse and select the Web.config file of the WCF web-site.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;8.&lt;/strong&gt; Once selected, the screen will be displayed as follows. The Web.config already has the configuration for the default service MyService under the Services node in the left-panel. Select this service and deleted it. We are going to create a new configuration for our service.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cF8HeIYS4rM/TnisbMN6c3I/AAAAAAAABNk/TPWjEDFHA8Y/s1600/Img3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="228px" rba="true" src="http://2.bp.blogspot.com/-cF8HeIYS4rM/TnisbMN6c3I/AAAAAAAABNk/TPWjEDFHA8Y/s320/Img3.jpg" width="320px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;9.&lt;/strong&gt; Right-click the Services node and select “New service” from the context menu. A service with service type NewServiceType will be created. On the right-panel, select the property “Name” and click the ellipsis. Service Type Browser will open up. Browse the bin folder of the web-site and locate the service assembly Wcf.Samples.ServiceLibrary and double-click it. The Service Type Browser dialog now will list the service “Wcf.Samples.ServiceLibrary.GreetingService” service. Select this service and click Open. This will set the service-type that we are going to configure.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;10.&lt;/strong&gt; Now for the above service, we first need to specify the end-point. Right-click Endpoints node in the left-panel of the WCF Service Configuration Editor and select “New Endpoint”. This will create a default end-point with its properties being displayed in the right-panel.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;11.&lt;/strong&gt; Set the following properties:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;defaultEp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;Address&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;http://localhost:28053/GreetingService/Service.svc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;· Here 28053 is the port-number where the local web-server is running. You need to check your port number and enter it here appropriately.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;Binding&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;basicHttpBinding&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;Contract&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;Wcf.Samples.ServiceLibrary.IGreeting&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;· You can click the ellipses to open the Contract Type Browser and select the appropriate assembly and contract from the bin directory of the web-site. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;12.&lt;/strong&gt; This sets the basic communication for our service. In order to enable the service for metadata exchange (thereby allowing us the browse its wsdl), we need to set the metadata exchange properties for the service. To do this, expand the Advanced node in the left-panel, right-click Service Behaviors and select “New Service Behavior Configuration”. This will add a new Behavior Configuration by the default name NewBehavior. Behavior is a collection of attributes (here, service attributes) that can be set and applied to the service together. Right now, we are going to define a behavior that allows the metadata exchange on the service. Set the Name property of the new behavior configuration to mexBehavior. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;13.&lt;/strong&gt; In the “Behavior element extension position” (lower part of the right-panel), click “Add” button. This opens up a dialog “Adding Behavior Element Extension Sections”. Select serviceMetadata from the list and click “Add” on the dialog. This adds the extension serviceMetadata to the grid in the right-panel. Double-click the extension to open up its property-page. Set the property HttpGetEnabled to true.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-MTy5cDchvK8/TnisdJMRNuI/AAAAAAAABNo/ZUjd4QGPEGw/s1600/Img4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="228px" rba="true" src="http://1.bp.blogspot.com/-MTy5cDchvK8/TnisdJMRNuI/AAAAAAAABNo/ZUjd4QGPEGw/s320/Img4.jpg" width="320px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-YvIxNHwQalY/TnisecBibkI/AAAAAAAABNs/c9lzodkt6bM/s1600/Img5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="320px" rba="true" src="http://3.bp.blogspot.com/-YvIxNHwQalY/TnisecBibkI/AAAAAAAABNs/c9lzodkt6bM/s320/Img5.jpg" width="282px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;14.&lt;/strong&gt; Now that we have defined the behavior separately, we need to associate the behavior with our service. To do this, select the Wcf.Samples.ServiceLibrary.GreetingService under the Services node in the left panel. The right-panel will display its properties. Select the BehaviorConfiguration property, and select “mexBehavior” from the drop-down.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;15.&lt;/strong&gt; This sets the service configuration and allows the service to communicate with the external world. Save the configuration by selecting the menu File-&amp;gt;Save. Close the WCF Service Configuration Editor.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;strong&gt;16.&lt;/strong&gt; Test that the service is hosted by running the WCF Web Site application. The following screen should be displayed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fEh6vLHr9R8/Tnisg1MJiyI/AAAAAAAABNw/ajpcMx4w1QQ/s1600/Img6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;img border="0" height="265px" rba="true" src="http://2.bp.blogspot.com/-fEh6vLHr9R8/Tnisg1MJiyI/AAAAAAAABNw/ajpcMx4w1QQ/s320/Img6.jpg" width="320px" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-4315997130370958733?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.bhargavapandey.com/feeds/4315997130370958733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.bhargavapandey.com/2011/09/hosting-wcf-service-in-iis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4315997130370958733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4315997130370958733'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/09/hosting-wcf-service-in-iis.html' title='Hosting WCF Service in IIS'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-6zxcNLd4tWU/Tnirmb-ziiI/AAAAAAAABNU/JJbwxENqHg4/s72-c/Img1_o.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-1887737405609077911</id><published>2011-08-14T19:52:00.003+05:30</published><updated>2011-08-31T15:45:50.212+05:30</updated><title type='text'>Placing Update Progress Control dynamically</title><content type='html'>&lt;a href="http://www.linksmanagement.com"&gt;Contextual Links&lt;/a&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;f you're using AJAX UpdateProgress control, you may find it difficuilt to set the best position where you should put it on the page, because user will not see it if he scrolls down (or up) from it. Here is a simple solution which will make your UpdateProgress more user-friendly, because it will set the position on the screen according to user's movement of the mouse. And you will prevent user to click on any button until the postback finishes execution.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;here is the code place the below code&amp;nbsp;in JavaScript&amp;nbsp;SCRIPT LANGUGE=JAVASCRIPT tag, ending with appropriate&amp;nbsp;closing tag&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function SetProgressPosition(e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var posx = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var posy = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!e) var e = window.event;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.pageX ||&amp;nbsp; e.pageY)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posx = e.pageX;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posy = e.pageY;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (e.clientX || e.clientY)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posx = e.clientX + document.documentElement.scrollLeft;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posy = e.clientY + document.documentElement.scrollTop;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById('divProgress').style.left = posx - 8 + "px";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById('divProgress').style.top = posy - 8 + "px";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;the on boy tag plave the code as body onmousemove="SetProgressPosition(event)"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;________________________________________&lt;/span&gt;&lt;br /&gt;Now place your updateProgress bar tag as (Note : each line has starting &amp;lt; and ending &amp;gt; Kidly include the same in each line)&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="100"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;ProgressTemplate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp; div class="overlay" id="divProgress"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please wait...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;br /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asp:Image GenerateEmptyAlternateText="true" ID="Image1" runat="server" ImageUrl="~/ajax-loader.gif" Style="margin-top: 7px;" /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; /div&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;/ProgressTemplate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;/asp:UpdateProgress&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;________________________________________&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;As you can see, most important part is javascript which is responsible for the movement of the UpdateProgress. That javascript is triggered with the "onmousemove" part of the body tag. In order to set UpdateProgress style, use this styel sheet:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;.overlay&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;border: black 1px solid;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;padding: 5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;z-index: 100;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;width: 100px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;position: absolute;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;background-color: #fff;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;-moz-opacity: 0.75;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;opacity: 0.75;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;filter: alpha(opacity=75);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;font-family: Tahoma;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;font-size: 11px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;font-weight: bold;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;text-align: center;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;As you can see, there is a part which makes UpdateProgress semi-transparent, which will make it look even better.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;And that's all, very simple, but very effective!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&amp;nbsp;Code in Action&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_l7kyivaxDKI/Ssy_FKYmuLI/AAAAAAAAA58/km4AlLWwizQ/s1600-h/ajax.jpg" style="background-clip: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; color: #5c80b1; margin-left: 1em; margin-right: 1em; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;&lt;img alt="" border="0" src="http://1.bp.blogspot.com/_l7kyivaxDKI/Ssy_FKYmuLI/AAAAAAAAA58/km4AlLWwizQ/s320/ajax.jpg" style="border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-1887737405609077911?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1887737405609077911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1887737405609077911'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/placing-update-progress-control.html' title='Placing Update Progress Control dynamically'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_l7kyivaxDKI/Ssy_FKYmuLI/AAAAAAAAA58/km4AlLWwizQ/s72-c/ajax.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-488787942155226222</id><published>2011-08-14T19:51:00.008+05:30</published><updated>2011-08-14T19:51:52.038+05:30</updated><title type='text'>How to Change your Office 2007 Product Key:</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: verdana; font-size: x-small; line-height: 18px;"&gt;&lt;span style="font-family: verdana;"&gt;Are you looking to change a Microsoft Office 2007 product license key, serial number or CD key? One common method used to change the product key for 2007 Microsoft Office programs or suites is to uninstall or remove Microsoft Office and then reinstall the program. Another approach is to edit your registry, reset and change the product serial key without uninstalling and reinstalling 2007 Office system suites.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;1.&amp;nbsp;&lt;/strong&gt;Click Start -&amp;gt; Run&lt;br /&gt;&lt;strong&gt;2.&amp;nbsp;&lt;/strong&gt;Type regedit in the box and click OK&lt;br /&gt;&lt;strong&gt;3.&amp;nbsp;&lt;/strong&gt;Navigate to the following path:&lt;br /&gt;HKEY_LOCAL_MACHINE \Software\Microsoft\Office\12.0\Registration&lt;br /&gt;Within Registration, there is subkey that may resemble the following:&lt;br /&gt;{30120000-0011-0000-0000-0000000FF1CE}&lt;br /&gt;&lt;strong&gt;4.&amp;nbsp;&lt;/strong&gt;Under Registration, you might find several subkeys that contain a combination of alphanumeric characters. Each key is specific to a program installed on your computer.Open each subkey to view and identify the Office product version by the ProductName registry entry in the right pane. For example:&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;ProductName=Microsoft Office Professional Plus 2007&lt;br /&gt;6.&amp;nbsp;&lt;/strong&gt;Once you have located the subkey that contains the Office product you wish to change the license key for, delete the following registry entries by right clicking on the registry entry in the subkey, click&amp;nbsp;&lt;strong&gt;Delete&lt;/strong&gt;, and select&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Yes:&lt;/strong&gt;DigitalProductID&lt;br /&gt;ProductID&lt;br /&gt;&lt;strong&gt;7.&amp;nbsp;&lt;/strong&gt;Close regedit&lt;br /&gt;&lt;strong&gt;8.&amp;nbsp;&lt;/strong&gt;Start Microsoft Word, Excel, Outlook or another Office application. Office 2007 should now prompt you to enter a new 25 character product key&lt;br /&gt;Enter a valid product key, and click OK&lt;br /&gt;&lt;strong&gt;9.&amp;nbsp;&lt;/strong&gt;If prompted to choose your preferred type of Microsoft Office 2007 installation, select Install Now&lt;br /&gt;&lt;strong&gt;10.&amp;nbsp;&lt;/strong&gt;Microsoft Office 2007 should now be updated with your new CD key&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-488787942155226222?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/488787942155226222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/488787942155226222'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/how-to-change-your-office-2007-product.html' title='How to Change your Office 2007 Product Key:'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2552527470960871540</id><published>2011-08-14T19:51:00.005+05:30</published><updated>2011-08-14T19:51:32.100+05:30</updated><title type='text'>Get offline maps for your Mobile (work with GPS/without GPS)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana; font-size: 11px;"&gt;Here's a tutorial which will guide you that how to get Google Map Offline on you Java Enabled phone. This works in most of the SE phones which have Java MIDP 2.0. While writing i assume that you are already familiar with Installing games, applications and transferring files to your phone from the PC.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;You Need:&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;A PC with internet connection.&lt;br /&gt;Windows XP/Vista (not tried with others)&lt;br /&gt;USB Chord of your SE phone.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;You need the application of Mini-Google-Maps (mgmaps for short)&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.mgmaps.com/download.php" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;&lt;span style="color: #336688; font-size: x-small;"&gt;DOWNLOAD&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;Choose "Stable (v1.3x)" and platform "Generic"&lt;br /&gt;Click on [jar] as we are going to use SE mobile phones, [jad] file is not required. You will now be asked to save the file. Please save it on your desktop (makes things easier )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;Now we need the map "tiles" which comprise the maps used by mgmaps.&lt;br /&gt;To download these, and a custom area map, you need a tool called gMapMaker. (You need MS .NET Framework v2.0 to run gMapMaker)&lt;br /&gt;&lt;/span&gt;&lt;a href="http://debin.net/gMapMaker/" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;&lt;span style="color: #336688; font-size: x-small;"&gt;DOWNLOAD&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Now we need to create a map file for a custom area.&lt;br /&gt;Go&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.mapcacher.com/" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;&lt;span style="color: #336688; font-size: x-small;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;and use the tool to create a ".map" file. Save this to your desktop too.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;INSTRUCTIONS:&lt;/strong&gt;&lt;br /&gt;1. Find the area that You want to get a map of.&lt;br /&gt;2. Draw a line around the area that You want mapped, by placing markers around in sequence. A single click places a marker, a click on a marker removes it. It is also possible to drag markers around after they have been placed.&lt;br /&gt;3. Specify zoom levels, map type, and detail level. WARNING: The maximum detail level can freeze Your browser for upto 5 minutes, depending on the complexity of the shape and other factors.&lt;br /&gt;4. Press the "Generate!" button. Wait for the script to generate everything. As a side note, Mozilla Firefox does the processing much much faster than IE does.&lt;br /&gt;&lt;br /&gt;Be careful and do not select a huge map size. Also select a modest zoom level. Level 17 is not needed, it will just clog up your memory.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;br /&gt;Now open gMapMaker.&lt;br /&gt;You should see something like this (the fields may differ)&lt;br /&gt;screenshot_1.jpg&lt;br /&gt;In "operating mode" select "MGMaps mode use a .map file"&lt;br /&gt;Click on "Go.." You will now be asked for the .map file which was saved on the desktop. Select it. gMapMaker will now download the tiles of your map. Please be patient, this can take a while.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;br /&gt;A folder should be created in "C:/Program Files/gMapMaker"(Windows XP) Or "C:/Desktop" (Windows Vista)&lt;br /&gt;&lt;br /&gt;It will contain another folder "MGMapsCache". Copy this to your memory card or phone memory (If it has enough space)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt;&lt;br /&gt;Now install the application "mgmaps.jar" in your mobile phone the usual way. Start the application. Go to menu-&amp;gt;settings-&amp;gt;map browsing&lt;br /&gt;Mark the fields of "Stored Maps" and "Offline mode"&lt;br /&gt;If your maps are inside the phone memory, Put the storage path as "C:/MGMapsCache", or if your maps are in the memory card put it as "E:/MGMapsCache". Select more-&amp;gt;save&lt;br /&gt;Restart the application. Press till it shows "Google Maps"&lt;br /&gt;If it does not show even after pressing repeatedly, go to menu-&amp;gt;settings-&amp;gt;map types. Here you will find something as "Not Available(Google)" Select it and mark "Google Maps"&lt;br /&gt;The maps should now be seen.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2552527470960871540?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2552527470960871540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2552527470960871540'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/get-offline-maps-for-your-mobile-work.html' title='Get offline maps for your Mobile (work with GPS/without GPS)'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-4880026069119317529</id><published>2011-08-14T19:51:00.002+05:30</published><updated>2011-08-14T19:51:08.912+05:30</updated><title type='text'>Dwongrading form Vista to XP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana; font-size: 12px;"&gt;&lt;strong&gt;&lt;span style="font-size: x-small;"&gt;Step 1.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Download the SATA Driver from your Vendor site of from Intel www.intel.com/support/chipsets/imsm/index.htm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Extract the file to a floppy or other location using third party tool. (Do a google for extracting) it should have the follwing files on extracted location.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;iaahci.cat&lt;br /&gt;iaahci.inf&lt;br /&gt;iastor.cat&lt;br /&gt;iastor.inf&lt;br /&gt;iastor.sys&lt;br /&gt;license.txt&lt;br /&gt;readme.txt&lt;br /&gt;txtsetup.oem&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 2.&amp;nbsp;&lt;/strong&gt;Create a folder on harddisk with same name as of XP Cd, Copy the content of our CD to your hard disk (Lets Say c:\winxp_vol)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;div id="chitikaAdBeacon-310"&gt;&lt;/div&gt;&lt;iframe allowtransparency="true" frameborder="0" height="0" hspace="0" id="ch_ad310" marginheight="0" marginwidth="0" name="ch_ad310" scrolling="no" src="about:blank" vspace="0" width="0"&gt;&lt;/iframe&gt;&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;Step 3.&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: x-small;"&gt;Navigate to c:\winxp_vol\i386, Open txtsetup.sif in notepad&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Find [SourceDisksFiles] Scroll to he last entry of this section. Add the follwing to the last line.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;iastor.sys=1,,,,,,4_,4,1,,,1,4&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 3.&lt;/strong&gt;&amp;nbsp;Open the txtSetup.oem from extracted folder (or Floppy Drive).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 4.&amp;nbsp;&lt;/strong&gt;Search for [HardwareIds.scsi.iaStor_ICH8M]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 5.&amp;nbsp;&lt;/strong&gt;Open txtsetup.sif and Find [HardwareIdsDatabase] Scroll to the last record under [hardwareIdsdatabase] and paste each ID so it looks like the following.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;[HardwareIdsDatabase]&lt;br /&gt;entry1&lt;br /&gt;entry2&lt;br /&gt;entry3 etc....&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_282A&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2829&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2822&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2821&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2682&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2681&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_27C3&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_27C6&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_27C1&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_27C5&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2652&amp;amp;CC_0104="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2652&amp;amp;CC_0106="iastor"&lt;br /&gt;PCI\VEN_8086&amp;amp;DEV_2653&amp;amp;CC_0106="iastor"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 6.&amp;nbsp;&lt;/strong&gt;Next we need to find [Scsi.Load] scroll down to the last entry and add the following to the bottom a&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;[Scsi.Load]&lt;br /&gt;iastor=iastor.sys,4&lt;br /&gt;Next Find [SCSI] scroll down to the bottom again and add the following&lt;br /&gt;[SCSI]&lt;br /&gt;iastor = "Intel(R) 82801HEM SATA RAID Controller (Mobile ICH8M-E)"&lt;br /&gt;iastor = "Intel(R) 82801HEM/HBM SATA AHCI Controller (Mobile ICH8M-E/M)"&lt;br /&gt;iastor = "Intel(R) 82801HR/HH/HO SATA RAID Controller (Desktop ICH8R)"&lt;br /&gt;iastor = "Intel(R) 82801HR/HH/HO SATA AHCI Controller (Desktop ICH8R)"&lt;br /&gt;iastor = "Intel(R) 631xESB/632xESB SATA RAID Controller (Server/Workstation ESB2)"&lt;br /&gt;iastor = "Intel(R) 631xESB/632xESB SATA AHCI Controller (Server/Workstation ESB2)"&lt;br /&gt;iastor = "Intel(R) 82801GHM SATA RAID Controller (Mobile ICH7MDH)"&lt;br /&gt;iastor = "Intel(R) 82801GR/GH SATA RAID Controller (Desktop ICH7R/DH)"&lt;br /&gt;iastor = "Intel(R) 82801GR/GH SATA AHCI Controller (Desktop ICH7R/DH)"&lt;br /&gt;iastor = "Intel(R) 82801GBM SATA AHCI Controller (Mobile ICH7M/DH)"&lt;br /&gt;iastor = "Intel(R) 82801FR SATA RAID Controller (Desktop ICH6R)"&lt;br /&gt;iastor = "Intel(R) 82801FR SATA AHCI Controller (Desktop ICH6R)"&lt;br /&gt;iastor = "Intel(R) 82801FBM SATA AHCI Controller (Mobile ICH6M)"&lt;br /&gt;Note.&amp;nbsp;&lt;/strong&gt;Replacce&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;the name of the driver with Iastor for each driver see above.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Save txtSetup.sif&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 7.&amp;nbsp;&lt;/strong&gt;Create a folder like c:\winxp_vol\$OEM$\$1\Drivers\SATA&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Copy the extracted file to this folder&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;IAAHCI.cat&lt;br /&gt;IAAHCI.inf&lt;br /&gt;IASTOR.cat&lt;br /&gt;IASTOR.inf&lt;br /&gt;IASTOR.sys&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 8.&amp;nbsp;&lt;/strong&gt;The iastor.sys need to be made into a cab. for this run the command from command prompt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Makecab C:\CDNAME\$OEM$\$1\Drivers\SATA\iastor.sys C:\CDNAME\$OEM$\$1\Drivers\SATA\iastor.sy_&lt;br /&gt;you can now delete the file iastor.sys.&lt;br /&gt;In the C:\CDNAME\$OEM$\$1\Drivers\SATA you should now have the following files&lt;br /&gt;IAAHCI.cat&lt;br /&gt;IAAHCI.inf&lt;br /&gt;IASTOR.cat&lt;br /&gt;IASTOR.inf&lt;br /&gt;IASTOR.sy_&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 9.&lt;/strong&gt;&amp;nbsp;Copy the iastor.sy_ into c:\winxp_vol\i386 folder.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 10.&amp;nbsp;&lt;/strong&gt;Open dosnet.inf in notepad (This is locted at c:\winxp_vol\i386 folder)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 11.&lt;/strong&gt;&amp;nbsp;FIND [Floppy.Files2] and copy the following "d1,iastor.sys" directly underneath&lt;br /&gt;like so&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;[Floppy.Files2]&lt;br /&gt;d1,iastor.sys&lt;/strong&gt;&lt;br /&gt;Do the same for [Files]&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;[Files]&lt;br /&gt;d1,iastor.sys&lt;/strong&gt;&lt;br /&gt;Save dosnet.inf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Step 12.&amp;nbsp;&lt;/strong&gt;Open Notepad and enter&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;[Unattended]&lt;br /&gt;OemPnpDriversPath="DRIVERS\SATA"&lt;br /&gt;OemPreinstall=Yes&lt;br /&gt;DriverSigningPolicy=Ignore&lt;br /&gt;NonDriverSigningPolicy=Ignore&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;[Data]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;MsDosInitiated=No&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Save the file in C:\CDNAME\i386 called winnt.sifwe now have the edited CD.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: 12px;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;Final Step.&amp;nbsp;&lt;/strong&gt;Save the contenet as bootable iso image and burn using any birning engine. Make sure to make the image as bootable XP image, You can download the boot image from Microsoft or other engine.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Insert the CD and reboot you machine now you will be able to install Windows XP without problem.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;If you face any problem, Please post acomment or write to me.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Thanks&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-size: x-small;"&gt;Happy Installing....&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-4880026069119317529?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4880026069119317529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4880026069119317529'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/dwongrading-form-vista-to-xp.html' title='Dwongrading form Vista to XP'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-5558376914987693233</id><published>2011-08-14T19:50:00.005+05:30</published><updated>2011-08-14T19:50:32.712+05:30</updated><title type='text'>How to get GPRS on windows Mobile</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;GPRS are most commom these days, but unfortunaltly getting GPRS on windows mobile is very tedeous. I get GPRS working on my Windows Mobile with very tedeous process.&lt;br /&gt;To get the GPRS working on my phone i made a lot of call to customer care of my mobile operator, but they have no clear way to get it working on my moble, The setting send by mobile operator was not working and get discared.&lt;br /&gt;So i decide to compile the step to get the GPRS working on my Windows Mobile with Vodafone India.&lt;br /&gt;Here are the steps&lt;br /&gt;1. Get GPRS activated on your SIM by calling the Customer Care.&lt;br /&gt;2. Go to Start --&amp;gt; Setting&lt;br /&gt;3. Tap the connections TAB.&lt;br /&gt;4. Select Connection.&lt;br /&gt;5. Select New Modem Connection.&lt;br /&gt;6. Enter Name for connection.&lt;br /&gt;7. Select a mode as Celllar line (GPRS)&lt;br /&gt;8. Enter Access Point name www.&lt;br /&gt;9. Click Finish.&lt;br /&gt;10. Click Ok the OK to return banck to main screen.&lt;br /&gt;11. Select Managemy Proxy Server.&lt;br /&gt;12. Enter 10.10.1.100 in the Proxy Sever Box.&lt;br /&gt;13. Select Advance&lt;br /&gt;14. Select HTTP and enter 10.10.1.100 and port name 9201.&lt;br /&gt;15. Enter 10.10.1.100 and port name 9201 in WAP, Secure WAP, and SOCKS&lt;br /&gt;16. Click OK.&lt;br /&gt;17. Yoy are done.&lt;br /&gt;&lt;br /&gt;Enjoy GPRS on you windows Mobile.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-5558376914987693233?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5558376914987693233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5558376914987693233'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/how-to-get-gprs-on-windows-mobile.html' title='How to get GPRS on windows Mobile'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-8061088969962522205</id><published>2011-08-14T19:50:00.002+05:30</published><updated>2011-08-14T19:50:04.936+05:30</updated><title type='text'>Installing XP on Dell Inspiron 1525</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;o install Windows XP on dell indpiron, Follwos the step.&lt;br /&gt;Before you install XP, you must first configure a setting in BIOS else XP CD will not detect your hardisk&lt;br /&gt;&lt;br /&gt;In BIOS:&lt;br /&gt;Onboard Devices -&amp;gt; Flash Cache Module -&amp;gt; Set Off&lt;br /&gt;Onboard Devices -&amp;gt; SATA Operation -&amp;gt; Set ATA&lt;br /&gt;&lt;br /&gt;now proceed with installing XP with a bootable XP CD.&lt;br /&gt;Now First of any driver installation install&lt;br /&gt;&lt;strong&gt;R153997 Mobile Chipset&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://supportapj.dell.com/support/downloa...7&amp;amp;fileid=205326" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;" target="_blank"&gt;http://supportapj.dell.com/support/downloa...7&amp;amp;fileid=205326&lt;/a&gt;&lt;br /&gt;Then you can install other driver in any order. The driver can be downloaded from DELL&lt;br /&gt;&lt;a href="http://supportapj.dell.com/" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;http://supportapj.dell.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy Installing.....&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-8061088969962522205?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/8061088969962522205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/8061088969962522205'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/installing-xp-on-dell-inspiron-1525.html' title='Installing XP on Dell Inspiron 1525'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-7663534513626784746</id><published>2011-08-14T19:49:00.003+05:30</published><updated>2011-08-14T19:49:46.426+05:30</updated><title type='text'>Singlton Pattern</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Singlton Pattern&lt;/strong&gt;&lt;br /&gt;In software engineering, the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object (an implementation of the mathematical concept of singleton). This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects (say, five). Some consider it an anti-pattern, judging that it is overused, introduces unnecessary limitations in situations where a sole instance of a class is not actually required, and introduces global state into an application&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;br /&gt;Implementation of a singleton pattern must satisfy the single instance and global access principles. It requires a mechanism to access the singleton class member without creating a class object and a mechanism to persist the value of class members among class objects. The singleton pattern is implemented by creating a class with a method that creates a new instance of the class if one does not exist. If an instance already exists, it simply returns a reference to that object. To make sure that the object cannot be instantiated any other way, the constructor is made protected (not private, because reuse and unit test could need to access the constructor). Note the distinction between a simple static instance of a class and a singleton: although a singleton can be implemented as a static instance, it can also be lazily constructed, requiring no memory or resources until needed. Another notable difference is that static member classes cannot implement an interface, unless that interface is simply a marker. So if the class has to realize a contract expressed by an interface, it really has to be a singleton.&lt;br /&gt;The singleton pattern must be carefully constructed in multi-threaded applications. If two threads are to execute the creation method at the same time when a singleton does not yet exist, they both must check for an instance of the singleton and then only one should create the new one. If the programming language has concurrent processing capabilities the method should be constructed to execute as a mutually exclusive operation.&lt;br /&gt;The classic solution to this problem is to use mutual exclusion on the class that indicates that the object is being instantiated&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Simple way&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;This solution is thread-safe without requiring special language constructs, but it may lack the laziness of the one below. The INSTANCE is created as soon as the Singleton class is initialized. That might even be long before getInstance() is called. It might be (for example) when some static method of the class is used. If laziness is not needed or the instance needs to be created early in the application's execution, or your class has no other static members or methods that could prompt early initialization (and thus creation of the instance), this (slightly) simpler solution can be used:&lt;br /&gt;&amp;nbsp;public class Singleton&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; private static final Singleton INSTANCE = new Singleton();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Private constructor prevents instantiation from other classes&lt;br /&gt;&amp;nbsp;&amp;nbsp; private Singleton() {}&lt;br /&gt;&amp;nbsp;&amp;nbsp; public static Singleton getInstance() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return INSTANCE;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br /&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// Thread-safe singleton example created at first call&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;public sealed class Singleton&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static Singleton _instance = new Singleton();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Singleton() { }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Singleton Instance&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _instance;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;h3 style="font-size: 11px; margin-bottom: -10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Issue with&amp;nbsp;Singleton Pattern&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Hides dependencies&lt;/strong&gt;&amp;nbsp;– A component that uses one or more singletons is hiding crucial information about your dependencies. It doesn’t take long for calls to a singleton to creep through your code base like kudzu, slowly attaching itself to every class in the system. Exposing that dependency forces you to think about it as you use a component. It also makes it more reusable as the caller can understand its requirements and how they might be satisfied.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hard to test&lt;/strong&gt;&amp;nbsp;– The hidden coupling of users on a singleton makes testing a nightmare as there is no way to mock out or inject a test instance of the singleton. Also, the state of the singleton affects the execution of a suite of tests such that they are not properly isolated from each other.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hard to subclass&lt;/strong&gt;&amp;nbsp;– Since initialization occurs in a singleton in static code, it is not amenable to subclassing because subclasses inherit the initialization code without the chance to override it.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;It’s a lie!&lt;/strong&gt;&amp;nbsp;(in most Java systems) – Singletons in Java are based on static variables, which are held per-classloader, not per-VM. In most systems of any complexity these days (any based on an app server, OSGi, Eclipse, plugins, etc) many classloaders will be involved. In that case, it is quite easy for two plugins to create their own instance of a singleton. Sometimes this is done by design and is desirable. But it’s also easy to screw up. It’s also usually critical that the singleton get created in the right classloader, which can make lazily constructing the singleton tricky.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A singleton today is a multiple tomorrow&lt;/strong&gt;&amp;nbsp;– It’s not at all unusual to discover that you now need 2 or more of something you previously only needed one of. Hard-coding the singleton pattern into your code makes it impossible to satisfy that demand later. This probably seems really weird if it hasn’t happened to you, but it has happened more than once to me.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;strong&gt;When to use&lt;/strong&gt;&lt;br /&gt;There are still some cases where singletons are a valid choice.&lt;br /&gt;One is logging. Logging is so pervasive that unless you use some fairly heavy-handed dependency injection or AOP, it is not feasible to inject every class in the system with a logger. Instead, this is a case where using static methods or singletons are probably worth the compromise.&lt;br /&gt;Another common use is to obtain a handle to a service locator (think JNDI) that knows how to access everything else. This is actually one way to change your entire system from using many singletons to using one singleton that knows how to find the others. This is a valid technique that addresses some of the inherent problems (mockability, testing) with singletons and may be a less invasive change to a legacy code base.&lt;br /&gt;Swing or other client-side UIs are another case where singletons may be a valid choice. In the case of a Java desktop app, it is likely that you have more complete control over your deployment environment than you do in a server-side application. In this case, it can be acceptable to have a manager class managing some state as a singleton in the VM. However, my preference would be to go the extra step to expose that dependency.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-7663534513626784746?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/7663534513626784746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/7663534513626784746'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/singlton-pattern.html' title='Singlton Pattern'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-5559971493002284438</id><published>2011-08-14T19:49:00.000+05:30</published><updated>2011-08-14T19:49:09.074+05:30</updated><title type='text'>Factory method pattern</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Factory method pattern&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;The factory method pattern is an object-oriented design pattern to implement the concept of factories.&lt;br /&gt;Like other creational patterns, it deals with the problem of creating objects (products) without specifying the exact class of object that will be created. The factory method design pattern handles this problem by defining a separate method for creating the objects, which subclasses can then override to specify the derived type of product that will be created. More generally, the term factory method is often used to refer to any method whose main purpose is creation of objects&lt;br /&gt;&lt;strong&gt;Definition&lt;/strong&gt;The essence of the Factory Pattern is to "Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses&lt;br /&gt;&lt;strong&gt;Benefits and variants&lt;/strong&gt;Although the motivation behind the factory method pattern is to allow subclasses to choose which type of object to create, there are other benefits to using factory methods, many of which do not depend on subclassing. Therefore, it is common to define "factory methods" that are not polymorphic to create objects in order to gain these other benefits. Such methods are often static.&lt;br /&gt;&lt;strong&gt;Descriptive names&lt;/strong&gt;&lt;br /&gt;A factory method has a distinct name. In many object-oriented languages, constructors must have the same name as the class they are in, which can lead to ambiguity if there is more than one way to create an object (see overloading). Factory methods have no such constraint and can have descriptive names. As an example, when complex numbers are created from two real numbers the real numbers can be interpreted as Cartesian or polar coordinates, but using factory methods, the meaning is clear (the following examples are in Java):&lt;br /&gt;class Complex&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Complex fromCartesian(double real, double imag) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new Complex(real, imag);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Complex fromPolar(double modulus, double angle) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new Complex(modulus * cos(angle), modulus * sin(angle));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Complex(double a, double b) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Complex c = Complex.fromPolar(1, pi); // Same as fromCartesian(-1, 0)&lt;br /&gt;When factory methods are used for disambiguation like this, the constructor is often made private to force clients to use the factory methods.&lt;br /&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;&lt;br /&gt;Factory methods encapsulate the creation of objects. This can be useful if the creation process is very complex, for example if it depends on settings in configuration files or on user input.&lt;br /&gt;Consider as an example a program to read image files and make thumbnails out of them. The program supports different image formats, represented by a reader class for each format:&lt;br /&gt;public interface ImageReader {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DecodedImage getDecodedImage();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class GifReader implements ImageReader {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DecodedImage getDecodedImage() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return decodedImage;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class JpegReader implements ImageReader {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ....&lt;br /&gt;}&lt;br /&gt;Each time the program reads an image it needs to create a reader of the appropriate type based on some information in the file. This logic can be encapsulated in a factory method:&lt;br /&gt;public class ImageReaderFactory {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static ImageReader getImageReader(InputStream is) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int imageType = determineImageType(is);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch(imageType) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ImageReaderFactory.GIF:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new GifReader(is);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case ImageReaderFactory.JPEG:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new JpegReader(is);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // etc.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;The code fragment in the previous example uses a switch statement to associate an imageType with a specific factory object. Alternatively, this association could also be implemented as a mapping. This would allow the switch statement to be replaced with an associative array lookup.&lt;br /&gt;&lt;strong&gt;Limitations&lt;/strong&gt;&lt;br /&gt;There are three limitations associated with the use of the factory method. The first relates to refactoring existing code; the other two relate to inheritance.&lt;br /&gt;The first limitation is that refactoring an existing class to use factories breaks existing clients. For example, if class Complex was a standard class, it might have numerous clients with code like:&lt;br /&gt;Complex c = new Complex(-1, 0);&lt;br /&gt;Once we realize that two different factories are needed, we change the class (to the code shown earlier). But since the constructor is now private, the existing client code no longer compiles.&lt;br /&gt;The second limitation is that, since the pattern relies on using a private constructor, the class cannot be extended. Any subclass must invoke the inherited constructor, but this cannot be done if that constructor is private.&lt;br /&gt;The third limitation is that, if we do extend the class (e.g., by making the constructor protected -- this is risky but possible), the subclass must provide its own re-implementation of all factory methods with exactly the same signatures. For example, if class StrangeComplex extends Complex, then unless StrangeComplex provides its own version of all factory methods, the call StrangeComplex.fromPolar(1, pi) will yield an instance of Complex (the superclass) rather than the expected instance of the subclass.&lt;br /&gt;All three problems could be alleviated by altering the underlying programming language to make factories first-class class members&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;br /&gt;public interface IPizza&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; decimal Price { get; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class HamAndMushroomPizza : IPizza&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; decimal IPizza.Price&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 8.5m;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class DeluxePizza : IPizza&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; decimal IPizza.Price&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 10.5m;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class HawaiianPizza : IPizza&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; decimal IPizza.Price&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 11.5m;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class PizzaFactory&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public enum PizzaType&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HamMushroom,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Deluxe,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hawaiian&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static IPizza CreatePizza(PizzaType pizzaType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPizza ret = null;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (pizzaType)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case PizzaType.HamMushroom:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = new HamAndMushroomPizza();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case PizzaType.Deluxe:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = new DeluxePizza();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case PizzaType.Hawaiian:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = new HawaiianPizza();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ArgumentException("The pizza type " + pizzaType + " is not recognized.");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class PizzaLover&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void Main(string[] args)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dictionary&amp;lt;PizzaFactory.PizzaType, IPizza&amp;gt; pizzas = new Dictionary&amp;lt;PizzaFactory.PizzaType, IPizza&amp;gt;();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (PizzaFactory.PizzaType pizzaType in Enum.GetValues(typeof(PizzaFactory.PizzaType)))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pizzas.Add(pizzaType, PizzaFactory.CreatePizza(pizzaType));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (PizzaFactory.PizzaType pizzaType in pizzas.Keys)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("Price of {0} is {1}", pizzaType, pizzas[pizzaType].Price);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br /&gt;Price of HamMushroom is 8.5&lt;br /&gt;Price of Deluxe is 10.5&lt;br /&gt;Price of Hawaiian is 11.5&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-5559971493002284438?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5559971493002284438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5559971493002284438'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/factory-method-pattern.html' title='Factory method pattern'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2377066153098268184</id><published>2011-08-14T19:48:00.003+05:30</published><updated>2011-08-14T19:48:29.669+05:30</updated><title type='text'>Detecting Post Back in Through Javascript</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;Some time we need to do some functionality in a page using JavaScript when page load for the first time only, The best way to do is to detect Post back and then perform the functionlaity in JavaScript.&lt;br /&gt;Here is the way to achive.&lt;br /&gt;Place the following code in&amp;nbsp;javaScript block&lt;br /&gt;&lt;br /&gt;&amp;nbsp;window.onload = isPostBack;&amp;nbsp;&amp;nbsp;&amp;nbsp; function isPostBack()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp; var chkPostBack = '&amp;lt;%= Page.IsPostBack ? "true" : "false" %&amp;gt;';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(chkPostBack == 'false')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert('Page loaded First Time');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert('Post back');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;Happy Coding...&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2377066153098268184?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2377066153098268184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2377066153098268184'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/detecting-post-back-in-through.html' title='Detecting Post Back in Through Javascript'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2204665069077174745</id><published>2011-08-14T19:48:00.000+05:30</published><updated>2011-08-14T19:48:04.660+05:30</updated><title type='text'>How to change the Volume Licensing product key of Windows XP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 id="tocHeadRef" style="font-size: 11px; margin-bottom: -10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Steps to change the volume licensing product key&lt;/h3&gt;This article describes two methods for how to change the Windows XP product key after a Volume Licensing installation to resolve the issue. One method uses the Windows Activation Wizard graphical user interface (GUI) and the other method uses a Windows Management Instrumentation (WMI) script. The Activation Wizard method is easier. However, if you must change the product key for multiple computers, the script method is more suitable.&lt;br /&gt;&lt;h4 id="tocHeadRef"&gt;Method 1: Use the Activation Wizard&lt;/h4&gt;&lt;strong&gt;Important&lt;/strong&gt;&amp;nbsp;This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:&lt;br /&gt;&lt;div class="indent"&gt;&lt;a class="KBlink" href="http://www.bhargavapandey.com/kb/322756/" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;322756&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span class="pLink"&gt;(http://support.microsoft.com/kb/322756/ )&amp;nbsp;&lt;/span&gt;How to back up and restore the registry in Windows&lt;/div&gt;If you only have a few volume licensing product keys to change, you can use the Activation Wizard.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note&lt;/strong&gt;&amp;nbsp;We recommend that you run System Restore to create a new restore point before you follow these steps.&lt;br /&gt;&lt;h5 id="tocHeadRef"&gt;Deactivate Windows&lt;/h5&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Click&amp;nbsp;&lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;Run&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In the&amp;nbsp;&lt;strong class="uiterm"&gt;Open&lt;/strong&gt;&amp;nbsp;box, type&amp;nbsp;&lt;span class="userInput"&gt;regedit&lt;/span&gt;, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In the navigation pane, locate and then click the following registry key:&lt;div class="indent"&gt;&lt;strong class="uiterm"&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;In the topic pane, right-click&amp;nbsp;&lt;strong class="uiterm"&gt;OOBETimer&lt;/strong&gt;, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;Modify&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Change at least one digit of this value to deactivate Windows.&lt;/li&gt;&lt;/ol&gt;&lt;h5 id="tocHeadRef"&gt;Reactivate Windows and add new product key&lt;/h5&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Click&amp;nbsp;&lt;strong class="uiterm"&gt;Start&lt;/strong&gt;, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;Run&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;In the&amp;nbsp;&lt;strong class="uiterm"&gt;Open&lt;/strong&gt;&amp;nbsp;box, type the following command, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;div class="indent"&gt;&lt;span class="userInput"&gt;%systemroot%\system32\oobe\msoobe.exe /a&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;strong class="uiterm"&gt;Yes, I want to telephone a customer service representative to activate Windows&lt;/strong&gt;, and then click&lt;strong class="uiterm"&gt;Next&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;strong class="uiterm"&gt;Change Product key&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Type the new product key in the&amp;nbsp;&lt;strong class="uiterm"&gt;New key&lt;/strong&gt;&amp;nbsp;boxes, and then click&amp;nbsp;&lt;strong class="uiterm"&gt;Update&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;If you are returned to the previous window, click&amp;nbsp;&lt;strong class="uiterm"&gt;Remind me later&lt;/strong&gt;, and then restart the computer.&lt;/li&gt;&lt;li&gt;Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message:&lt;div class="message"&gt;Windows is already activated. Click OK to exit.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Click&amp;nbsp;&lt;strong class="uiterm"&gt;OK&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;Install Windows XP Service Pack 1a or a later version of Windows XP.&lt;/li&gt;&lt;/ol&gt;If you cannot restart Windows after you install Windows XP SP1 or a later version of Windows XP, try the following steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Restart your computer and start pressing F8 until you see the Windows Advanced Options menu.&lt;/li&gt;&lt;li&gt;Select&amp;nbsp;&lt;strong class="uiterm"&gt;Last Known Good Configuration&lt;/strong&gt;&amp;nbsp;from the menu and press ENTER. This option starts Windows by using a previous good configuration.&lt;/li&gt;&lt;li&gt;Repeat steps 1 through 8 under "Reactivate Windows and add new product key."&lt;/li&gt;&lt;/ol&gt;If you can install SP1 or a later version of Windows XP and you can restart Windows, you have resolved the issue. If the issue has not been resolved, try method 2 or see the "Next Steps" section for more troubleshooting resources.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2204665069077174745?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2204665069077174745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2204665069077174745'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/how-to-change-volume-licensing-product.html' title='How to change the Volume Licensing product key of Windows XP'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-770149099665343112</id><published>2011-08-14T19:47:00.003+05:30</published><updated>2011-08-14T19:47:41.253+05:30</updated><title type='text'>Installing Windows Mobile 6.5 on Asus P320 (Updated)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;It was great experiance for me to install Windows Mobile 6.5 on my Asus P320, To make it easy i am sharing the step with you all.&lt;br /&gt;First of all Download the WM 6.5 ROM&amp;nbsp; form&lt;a href="http://forum.xda-developers.com/showthread.php?p=3542813" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.bhargavapandey.com/pics/remote.gif); background-origin: initial; background-position: 100% 0%; background-repeat: no-repeat no-repeat; color: #5c80b1; padding-right: 10px; text-decoration: none; white-space: nowrap;"&gt;http://forum.xda-developers.com/showthread.php?p=3542813&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;1.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Down Load and&amp;nbsp;UNZIP&amp;nbsp;&lt;/span&gt;&amp;nbsp;P320 NEW ROM.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;2.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Directly copy folder “(Folder u have got by unzipping” into the root directory of your micorSD card.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;3.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; Advised&amp;nbsp; to Backup all your Contacts &amp;amp; Messages Using&amp;nbsp;any backup&amp;nbsp;application.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;4.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Keep the battery in charge during upgrade procedure.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;5.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;Press and hold Volume Down key (on left side, shown below) and poke reset button (on bottom side), the system will boot up.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;6.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Then release reset button and continue to hold Volume Down key until the&amp;nbsp; screen shows writing percentage.&lt;/span&gt;&lt;/span&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 14pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;Sometime it will show TTFT USB, it means you have not placed the Flash file inside the Root Folder If it will show Plug the USB&amp;nbsp; &amp;amp; dont plug.What u have to do is place the&amp;nbsp;&lt;strong&gt;FLASH FILE&lt;/strong&gt;&amp;nbsp;inside the correct folder , as i said in above also.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;7.&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp;&lt;/span&gt;The system will start installation automatically.&amp;nbsp; It will re-start when system installation is completed.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;8. System will start upgrading after touch panel calibration and date/time setting.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="padding-left: 60px;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;You wont be able to&amp;nbsp; acess the Start Menu at first Startup, so kindly copy all the files whic are under "Copy all the files which are inside this folder to windows of ur ASUS P30 Phone" folder.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;to Windows folder of P320&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;IF NOT ABLE TO SEE WINDOWS FOLDER IN YOUR PC, FOLLOW THE STEPS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: 0pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;Go to Control Panel&amp;gt;&amp;gt; Open Folders Tap, Click on View, Uncheck "Hide protected windows operating system files" .&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img alt="" border="0" src="http://1.bp.blogspot.com/_0_9ImeBbNmM/SuaLCt-mnzI/AAAAAAAAAJQ/XKokmxtDx8M/s400/Untitled.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial;" /&gt;&lt;/div&gt;&amp;nbsp;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;Enjoy the new look of you Windows Mobile 6.5 :)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-770149099665343112?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/770149099665343112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/770149099665343112'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/installing-windows-mobile-65-on-asus.html' title='Installing Windows Mobile 6.5 on Asus P320 (Updated)'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0_9ImeBbNmM/SuaLCt-mnzI/AAAAAAAAAJQ/XKokmxtDx8M/s72-c/Untitled.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-1559602444151336305</id><published>2011-08-14T19:47:00.000+05:30</published><updated>2011-08-14T19:47:07.049+05:30</updated><title type='text'>Using CASE to transform a result set from multiple rows into a summary row</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;Consider the situation where sales data is stored in a table by month. One row is stored per month with a table structure that looks like the following:&lt;/span&gt;&lt;br /&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 6pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span style="font-size: xx-small;"&gt;CREATE TABLE prodsales&lt;br /&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;(product char(3),&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;mnth&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;smallint,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;sales&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;money)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 6pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span style="font-family: ' ';"&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;In this table, sales amounts (sales) are stored by month (mnth) and product code (product). The mnth column stores an integer value ranging from 1 (for January) to 12 (for December). You can use the following single SQL statement to product one row per product with 12 totals, one for each month:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4&gt;&lt;span style="font-size: xx-small;"&gt;SQL Statement will go like this&lt;/span&gt;&lt;/h4&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 5.75pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: xx-small;"&gt;&lt;span&gt;SELECT product,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 1 THEN sales ELSE NULL END) AS jan,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 2 THEN sales ELSE NULL END) AS feb,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 3 THEN sales ELSE NULL END) AS mar,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 4 THEN sales ELSE NULL END) AS apr,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 5 THEN sales ELSE NULL END) AS may,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 6 THEN sales ELSE NULL END) AS jun,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 7 THEN sales ELSE NULL END) AS jul,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 8 THEN sales ELSE NULL END) AS aug,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 9 THEN sales ELSE NULL END) AS sep,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 10 THEN sales ELSE NULL END) AS oct,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 11 THEN sales ELSE NULL END) AS nov,&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SUM(CASE mnth WHEN 12 THEN sales ELSE NULL END) AS dec&lt;br /&gt;FROM prodsales&lt;br /&gt;GROUP BY product &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 5.75pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 6pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span&gt;&lt;span style="font-size: xx-small;"&gt;This statement will generates a row for each product with twelve monthly sales totals. The CASE expression causes the sales amount to by added to the appropriate bucket by checking the mnth column. If the month value is for the appropriate “month bucket”, then the sales amount is added using SUM; if not, then NULL is specified, thereby avoiding adding anything to the SUM. Using CASE expressions in this manner simplifies aggregation and reporting. It provides a quick way of transforming normalized data structures into the more common denormalized formats that most business users are accustomed to viewing on reports.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 6pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" class="MsoNormal" style="line-height: 12pt; margin-bottom: 12pt; margin-left: 6pt; margin-right: 5.75pt; margin-top: 0in;"&gt;&lt;span&gt;&lt;span style="font-size: xx-small;"&gt;Happy Coding :)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-1559602444151336305?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1559602444151336305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1559602444151336305'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/using-case-to-transform-result-set-from.html' title='Using CASE to transform a result set from multiple rows into a summary row'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-3440552992562176885</id><published>2011-08-14T19:46:00.003+05:30</published><updated>2011-08-14T19:46:32.576+05:30</updated><title type='text'>Placing Google Adsense to your each post, (Blogengine.net)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;Placing Google Adsense to your each post, (Blogengine.net)&lt;br /&gt;When my Google Adesne approved, i had tried a lot of variation and did code alteration, so that my Adsense Ad appear in my each post. After doing a varity of code variation found a very simple way to implemet this.&lt;br /&gt;To make this easy for all of you i am sharing my method with you all.&lt;br /&gt;1. Get you adesnes code in any text editor, like Notepad.&lt;br /&gt;2. Navigate to theme/&amp;lt;yourthema&amp;gt;/PostView.ascx&lt;br /&gt;3. Edit the PostView.ascx&lt;br /&gt;4. Find out the&amp;nbsp;&lt;strong&gt;"PlaceHolder ID="BodyContent" runat="server"&lt;/strong&gt;&amp;nbsp;tag&lt;br /&gt;5. Paste your Adsens Code just below this tag.(Please note that the script should after PlaceHolder tag and before the closing of&amp;nbsp;&lt;strong&gt;div&lt;/strong&gt;&amp;nbsp;tag&lt;br /&gt;6. Save the code. an dthat 's it.&lt;br /&gt;Enjoy the injection of you Google Adsense Ad to your each post automatically,&lt;br /&gt;Note: As this is an ASCX page you can download the page, edit on your local machine the upload to you site. No need to recompile and republish the entire site.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-3440552992562176885?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/3440552992562176885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/3440552992562176885'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/placing-google-adsense-to-your-each.html' title='Placing Google Adsense to your each post, (Blogengine.net)'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2754544263270064036</id><published>2011-08-14T19:46:00.000+05:30</published><updated>2011-08-14T19:46:05.053+05:30</updated><title type='text'>Method Overloading in Web Services</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;By default Web Services do not support ‘Method Overloading’.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;Reason:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: black; font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;When data is passed to an XML Web service it is sent in a request and when it is returned it is sent in a response. Therefore, if an XML Web service contains two or more XML Web service methods with the same name, no uniquely identification will be there. Hence it will produce error&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: black; font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;To implement method overloading in webservices first you must&amp;nbsp;set the&amp;nbsp;&lt;em&gt;MessageName&lt;/em&gt;attribute of your webservice then set your webservice binding&amp;nbsp;&lt;em&gt;ConformsTo&lt;/em&gt;&amp;nbsp;attribute to&lt;em&gt;WsiProfiles.None&lt;/em&gt;&amp;nbsp;and that’s it! Note that you can do second step in your Web.Config file for all webservices.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Below is&amp;nbsp;an exaple to implement, Overloading in web service.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: black; font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Modify the attribute as:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;[WebService(Namespace = "http://tempuri.org/")]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;[WebServiceBinding(ConformsTo = WsiProfiles.None)]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: black;"&gt;Complete Code:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;[WebService(Namespace = "http://tempuri.org/")]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;[WebServiceBinding(ConformsTo = WsiProfiles.None)]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;public class Service : System.Web.Services.WebService&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Service () {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string HelloWorld()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "hello";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebMethod(MessageName = "HelloWorld2")]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string HelloWorld(int i)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Overloading";&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; margin-left: 40.5pt; margin-right: 4.5pt; margin-top: 0in;"&gt;&lt;span style="font-size: 8.5pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2754544263270064036?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2754544263270064036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2754544263270064036'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/method-overloading-in-web-services.html' title='Method Overloading in Web Services'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-6280327995105177404</id><published>2011-08-14T19:45:00.000+05:30</published><updated>2011-08-14T19:45:09.461+05:30</updated><title type='text'>A short note on Agile Methodology</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Agile methodology is an adaptive methodology, its people&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-family: verdana, geneva;"&gt;oriented.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;Here are some of the other characteristics of the Agile&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;Methodology.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;1. Delivery frequently.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;2. Good ROI for client.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;3. Test frequently.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;4. Collaborative approach.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Agile methodology is more of people oriented. Agile &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;methodology helps us to increase productivity and reduce &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;risks.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;There are 2 popular agile methods- Extreme &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;programming (XP) and Scrum.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;People believe that there is less documentation in Agile. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;But agile also includes documentation and it can be used &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;either&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;a small or a large projects. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;In agile Development, &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;testing is also integrated throughout the life cycle. But &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;for the testers,&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;they will not have a good business &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;requirement. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;So they have to get the details from the &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;client or through the developer.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;The testers will do more &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;of Quality Assurance work than testing. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt; Agile Methodology- Characteristics&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Ø&lt;span&gt;&amp;nbsp; &lt;/span&gt;Frequent Delivery&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Ø&lt;span&gt;&amp;nbsp; &lt;/span&gt;More Iterations&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Ø&lt;span&gt;&amp;nbsp; &lt;/span&gt;Test frequently&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Ø&lt;span&gt;&amp;nbsp; &lt;/span&gt;Less defects&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Agile is software development methodology. It is very &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;effective where Client frequently changes his requirement. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Since it has more iteration so you can assure &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;a &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;solution &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;that meets clients requirement. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;More than one build deployement&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;for a project. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;It involves more client interection and testing effort. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;There are two &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;methods by which this methodology &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;can be &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;implemented:-&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;1- Scrum&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;2- Extreme Progamming&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Scrum: Each iteration would called a scrum which can be a 1- &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;2 Months.In Scrum Client prioritise his requirements&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;what &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;he want first. If developer did not&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt; meets all the &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;requirement which was being fixed for a perticular scrum &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;than&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;rest of the development part would be transferred to &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;the next scrum&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt; (would be delievered in the next build),&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;means&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;developer cann't increase time decided for a scrum &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;It’s fixed.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Extreme Programming (XP): here iteration period would be &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;less than in scrum , which is being 2-4 weeks.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Here developer prioritize what to do first on the basis of &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;client requirement. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;This duration which was being fixed for a&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;iteration, can be &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;increase if the some &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;development part is still pending. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;The build would deploy with having all the client &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;needs. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Thus iteration period is not fixed here it can be increase. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;but iteration should meets all the client's requirement in &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;this build. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;More attention is required for testing in XP.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Apart from all the above answers, just add this important &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;point. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;There are many flavors of Agile Development:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;1- Agile Manifesto&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;2- (XP) Extreme Programming&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;3- Scrum&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;4- Crystal&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;5- Context Driven Testing&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;6- Lean Development&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;7- (Rational) Unified Process&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Agile development methodology attempts to provide many &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;opportunities to assess the direction of a project &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;throughout&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;the development lifecycle. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;This is achieved through regular cadences of work, known as &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;sprints or iterations, at the end&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;of which teams must &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;present a shippable increment of work. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Thus by focusing on &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;the repetition of abbreviated work cycles as well as the &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;functional product they yield, agile methodology&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;could be &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;described as “iterative” &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;and “incremental.” &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;In waterfall, development teams only have one chance to get &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;each aspect of a project right. In an agile &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;paradigm, every &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;aspect of &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;development — requirements, design, etc. — is &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;continually revisited throughout the lifecycle. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;When a team &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;stops and re-evaluates the direction of a &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;project every two &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;weeks, there’s always time to steer it in another direction. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;The results of this “inspect-and-adapt” approach to &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;development greatly reduce both development costs and time &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;to market. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Because teams can gather &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;requirements at the &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;same time they’re gathering requirements, the phenomenon &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;known as&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;“analysis paralysis” can’t really impede a team &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;from making progress.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt; And because a team’s work cycle is &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;limited to two weeks, it gives stakeholders recurring &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;opportunities to calibrate releases&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;for success in the real &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;world. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;In essence, it could be said that the agile development &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;methodology helps companies build the right product. &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;Instead of &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;committing to market a piece of &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;software that &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;hasn’t even been written yet, agile empowers teams to &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;optimize their release&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;as it’s developed, to be as &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;competitive as possible in the marketplace. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;In the end, a &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;development agile methodology that preserves a product’s &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;critical market relevance and ensures a team’s &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;work doesn’t &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;wind up on a shelf,&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt; never released, is an attractive option &lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;for stakeholders and developers alike.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-6280327995105177404?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/6280327995105177404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/6280327995105177404'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/short-note-on-agile-methodology.html' title='A short note on Agile Methodology'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-5378576641662812111</id><published>2011-08-14T19:44:00.002+05:30</published><updated>2011-08-14T19:44:21.924+05:30</updated><title type='text'>AJAX Page life cycle</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 class="subHeading" style="font-size: 11px; margin-bottom: -10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Asynchronous Postback&lt;/h3&gt;&lt;div class="subsection"&gt;An asynchronous postback sends some page data to the server, receives a response, and updates a part of the page. Assume the following scenario for an asynchronous postback:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The page contains a&amp;nbsp;&lt;span&gt;ScriptManager&lt;/span&gt;&amp;nbsp;control, and the control's&amp;nbsp;&lt;span&gt;SupportsPartialRendering&lt;/span&gt;&amp;nbsp;and&lt;span&gt;EnablePartialRendering&lt;/span&gt;&amp;nbsp;properties are both&amp;nbsp;&lt;span&gt;&lt;span class="input"&gt;true&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;The page contains an&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;control, and the control's&amp;nbsp;&lt;span&gt;ChildrenAsTriggers&lt;/span&gt;&amp;nbsp;property is&amp;nbsp;&lt;span&gt;&lt;span class="input"&gt;true&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;A button inside the&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;control initiates an asynchronous postback.&lt;/li&gt;&lt;li&gt;A response from the server is returned successfully.&lt;/li&gt;&lt;/ul&gt;The following client events occur, in this order:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The button inside the&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;is clicked, which initiates an asynchronous postback.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;initializeRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;beginRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The request is sent to the server.&lt;/li&gt;&lt;li&gt;The response is received by the client.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;pageLoading&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;pageLoaded&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;Application&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;load&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;endRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;/ol&gt;For more information, see&amp;nbsp;&lt;span&gt;Working with Partial-Page Rendering Events&lt;/span&gt;.&lt;br /&gt;Note that the&amp;nbsp;&lt;strong&gt;load&lt;/strong&gt;&amp;nbsp;event of the&amp;nbsp;&lt;strong&gt;Application&lt;/strong&gt;&amp;nbsp;instance is raised after the&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&lt;strong&gt;pageLoaded&lt;/strong&gt;event and before its&amp;nbsp;&lt;strong&gt;endRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/div&gt;&lt;h3 class="subHeading" style="font-size: 11px; margin-bottom: -10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Multiple Asynchronous Postbacks&lt;/h3&gt;&lt;div class="subsection"&gt;Multiple asynchronous postbacks can occur when users initiate a new request before a previously initiated request has finished processing on the server or in the browser. Assume the following scenario for multiple asynchronous postbacks:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The page contains a&amp;nbsp;&lt;span&gt;ScriptManager&lt;/span&gt;&amp;nbsp;control and the control's&amp;nbsp;&lt;span&gt;SupportsPartialRendering&lt;/span&gt;&amp;nbsp;and&lt;span&gt;EnablePartialRendering&lt;/span&gt;&amp;nbsp;property are both&amp;nbsp;&lt;span&gt;&lt;span class="input"&gt;true&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;The page contains an&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;control.&lt;/li&gt;&lt;li&gt;A button inside the&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;control that initiates an asynchronous postback is clicked two times. The second click occurs while the server is processing the request initiated by the first click.&lt;/li&gt;&lt;li&gt;A response to the first request is returned successfully from the server.&lt;/li&gt;&lt;/ul&gt;The following client events occur, in this order:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A button inside the&amp;nbsp;&lt;span&gt;UpdatePanel&lt;/span&gt;&amp;nbsp;is clicked, which initiates an asynchronous postback.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;initializeRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;beginRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The request is sent to the server.&lt;/li&gt;&lt;li&gt;The button is clicked again, which initiates a second asynchronous postback.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;initializeRequest&lt;/strong&gt;&amp;nbsp;event for the second button click.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;endRequest&lt;/strong&gt;&amp;nbsp;event for the first button click.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;beginRequest&lt;/strong&gt;&amp;nbsp;event for the second button click.&lt;/li&gt;&lt;li&gt;The request initiated by the second click is sent to the server.&lt;/li&gt;&lt;li&gt;The response is received for the second click.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;pageLoading&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;pageLoaded&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;Application&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;load&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;li&gt;The&amp;nbsp;&lt;strong&gt;PageRequestManager&lt;/strong&gt;&amp;nbsp;instance raises the&amp;nbsp;&lt;strong&gt;endRequest&lt;/strong&gt;&amp;nbsp;event.&lt;/li&gt;&lt;/ol&gt;The default behavior of asynchronous postbacks is that the most recent asynchronous postback takes precedence. If two asynchronous postbacks occur in sequence, and if the first postback is still being processed in the browser, the first postback is canceled. If the first postback has been sent to the server, the server processes the second request when it arrives and does not return the first request. For information about how to give precedence to a specific asynchronous postback, see&amp;nbsp;&lt;span&gt;Giving Precedence to a Specific Asynchronous Postback&lt;/span&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-5378576641662812111?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5378576641662812111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/5378576641662812111'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/ajax-page-life-cycle.html' title='AJAX Page life cycle'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-4239671089609349564</id><published>2011-08-14T19:43:00.002+05:30</published><updated>2011-08-14T19:43:35.147+05:30</updated><title type='text'>VSTS 2010 for Architect</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Designing new functionality on existing applications can be daunting.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;There are always differences between the original design and the current implementation.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;The new Architecture tools within Visual Studio Team System 2010 help you understand the application you have, design new functionality you need, and validate that your design and your implementation do not deviate.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span&gt;&lt;strong&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Understanding What You Have&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Understanding the dependencies between parts of your application can be critical to determining where you may have problems.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Additionally, having a visual graph can help you find the best place to implement new functionality.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;You can get a big picture view of your solution by assembly, namespace, class or a custom filter in a Directed Graph Markup Language document (DGML) using the Generate Dependency Graph feature:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Generate Dependency Graph" border="0" height="196" src="http://kxacog.blu.livefilestore.com/y1pUm3WeY_eqc4_6IWwsS9XTH4VJoFEjTWbsaimfso1JRsh0sUv1SDb2YlSCPCwWWWvgshJ-nIyR8rJdbeGWqXjSw/GenerateDependencyGraph.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 196px; width: 544px;" title="Generate Dependency Graph" width="544" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;The DGML document generated from your solution can be visualized as a Dependency Matrix, Force Directed Layout, or as a Top to Bottom layout, as shown below.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Each view can provide a different take on the structure of your project.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Top to Bottom Layout" border="0" height="271" src="http://kxacog.blu.livefilestore.com/y1piCAavwc-b4bL_DIFCesP0Epn1nzlIGr2GhP-EcAEfA6YSzli33nLcW3-5aBejuSV_4lW_sfRk2qJhWT9xZgYFQ/TopToBottomLayoutSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 271px; width: 550px;" title="Top to Bottom Layout" width="550" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;This high-level view is a great way to understand the overall shape of your architecture, but understanding the dependencies for an area you need to change can make the difference between a fifteen-minute change and a one-hour change.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;For instance, being able visualize the relationships around the&amp;nbsp;&lt;em&gt;Cart&lt;/em&gt;&amp;nbsp;class can be very helpful in making changes to the shopping cart:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Cart Class" border="0" height="190" src="http://kxacog.blu.livefilestore.com/y1pJTbhHEhbZAPINTwvV0IXsuaww74wo4KUrrJA4mSduYv8DFT6VI8TRpjMS-Xa0FZccTtrt5PD5d1B4yZOuY1WIA/CartClassSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 190px; width: 547px;" title="Cart Class" width="547" /&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Another valuable way of understanding how your application works is to be able to visualize the sequence of calls that happen in key sections of your application.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;The Generate Sequence Diagram function, available in the code editor, will give you a view of the method calls your application makes.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Below, you can see the sequence of calls that make up the&amp;nbsp;&lt;em&gt;Add&lt;/em&gt;&amp;nbsp;method implementation within the shopping cart.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Sequence diagram" border="0" height="462" src="http://kxacog.blu.livefilestore.com/y1p7QXEQY9L2Me_R22q6ZDeZqJMkh1gI5tIE859GigoPGzOom5T6e7KgQWgv5VxSEQcqyv4k4sxsXfvdiTGyAmb0A/SequenceDiagramSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 462px; width: 548px;" title="Sequence diagram" width="548" /&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span&gt;&lt;strong&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Designing New Functionality&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Now that you have a more complete understanding of your existing application, you are in a better position to add functionality.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Collaborating on design requires communicating in a standard way. Unified Modeling Language (UML) diagrams allow you to express your design in a way that others can understand.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;For instance, you can build UML Component and Class diagrams that describe the existing structural elements of your design, then add new elements to the diagrams to illustrate and document your changes.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Below is how a completed Component diagram might look:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Component Diagram" border="0" height="329" src="http://kxacog.blu.livefilestore.com/y1pawoOFeDh_KF0SqaHPtivP_X432eNNGIlw3PKP-kFsRuYyV3mFhXYGN6MwkFdQ9jO3xTcaPxnxvCtVKj5myaDOQ/ComponentDiagramSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 329px; width: 439px;" title="Component Diagram" width="439" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;A Class diagram might look like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Class Diagram" border="0" height="416" src="http://kxacog.blu.livefilestore.com/y1pRgMoR6icwBrR264eGg9KXfA97znL4-VPF3KyGwG94QVYkZq39cCsz0FEQjL2BA5ncYF7YWAQVAtfe2dVxsURUQ/ClassDiagramSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 416px; width: 440px;" title="Class Diagram" width="440" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;The Use Case diagram below enables teams to better understand and agree on the functions of the application.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Use Case Diagram" border="0" height="368" src="http://kxacog.blu.livefilestore.com/y1p29asqaRLxmaCSGPAP31sXqMBvXcYcGpEw06RuLZlprW_zaQvkjQjpiysEtpzy2uTfjKisMpDZbKKeHkEU4Tbbw/OrderUseCasesSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 368px; width: 550px;" title="Use Case Diagram" width="550" /&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Once you have a UML diagram, you can create or link designer elements to work items within Team Foundation Server’s (TFS) Work Item Tracking system.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="TFS Integration" border="0" height="329" src="http://kxacog.blu.livefilestore.com/y1ps836v-VxuiTsXIGLQ8Vdfl4uJrY5u0D4pu6xFPYpwYTLBkVz4r51ccqsbLGWt5I3DhHl1pM9fesfZuKekiBXpw/TFSIntegrationSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; height: 329px; width: 425px;" title="TFS Integration" width="425" /&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span&gt;&lt;strong&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Ensuring Application Validation&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;Over time, the code quality of a project can degrade if bug fixes and new feature implementations are not done with overall architecture in mind.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;This is where the Layer designer and Layer validation can help.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;The Layer designer enables you to define the logical layers and valid communication paths between layers of your project.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Once you have associated assemblies, namespaces, and classes with layers in the Layer diagram, you can validate existing or new code against the layering constraints.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;For example, in this Layer diagram, it is valid for software within the&lt;em&gt;Presentation&amp;nbsp;&lt;/em&gt;layer to have dependencies on software within&amp;nbsp;&lt;em&gt;the Business Logic&lt;/em&gt;&amp;nbsp;layer.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;However, since there is not a dependency line&amp;nbsp;&lt;span&gt;between&amp;nbsp;&lt;em&gt;Presentation&lt;/em&gt;&lt;/span&gt;&amp;nbsp;&lt;span&gt;and&lt;em&gt;&amp;nbsp;Resource Access&lt;/em&gt;&lt;/span&gt;, any software that attempts to take that dependency would cause a compile-time violation in the Error List.&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;&lt;img alt="Layer Diagram" border="0" src="http://kxacog.blu.livefilestore.com/y1pYh99EZ4RHsTAgdYJSz_fNfhBGEJyQmQCygbmW-rhSX7GewMOFAIdkkwQMPMJqg6gQmPYeJEM0FcHw5Ybz6wweg/LayerDiagramSmall.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial;" title="Layer Diagram" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;"&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;span&gt;You can validate layer constraints from the designer surface, command line, or from within the build process.&lt;span&gt;&amp;nbsp;&lt;/span&gt;Team Build’s gated check-in process ensures that layer constraint violations never make it into source control.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-4239671089609349564?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4239671089609349564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/4239671089609349564'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/vsts-2010-for-architect.html' title='VSTS 2010 for Architect'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-2585921935537053044</id><published>2011-08-14T19:42:00.000+05:30</published><updated>2011-08-14T19:42:27.128+05:30</updated><title type='text'>Thread safe singleton Pattern</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span lang="EN" style="color: black; font-size: 9.5pt; line-height: 14px;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;.NET is&amp;nbsp;&lt;em&gt;multithreaded&lt;/em&gt;&amp;nbsp;meaning that more than one thread can execute our Singleton concurrently. This means that we never know—and don't usually care—that our thread may be starting and stopping with other threads running in the gaps.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;The singleton pattern is one of the best-known patterns in software engineering. Essentially, a singleton is a class which only allows a single instance of itself to be created, and usually gives simple access to that instance.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Singleton is lazily - i.e. that the instance isn't created until it is first needed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;The four common characteristics of a singleton are&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul type="disc"&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;A single constructor, which is private and parameterless. This prevents other classes from instantiating it (which would be a violation of the pattern). Note that it also prevents subclassing - if a singleton can be subclassed once, it can be subclassed twice, and if each of those subclasses can create an instance, the pattern is violated. The factory pattern can be used if you need a single instance of a base type, but the exact type isn't known until runtime.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;The class is sealed. This is unnecessary, strictly speaking, due to the above point, but may help the JIT to optimise things more.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;A static variable which holds a reference to the single created instance, if any.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;A public static means of getting the reference to the single created instance, creating one if necessary.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;Note that all of these implementations also use a public static property&amp;nbsp;&lt;/span&gt;&lt;span&gt;Instance&lt;/span&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&amp;nbsp;as the means of accessing the instance. In all cases, the property could easily be converted to a method, with no impact on thread-safety or performance&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;&lt;strong&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;Singleton Implementation&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="color: #0000cc; font-family: 'Courier New'; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;sealed&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&amp;nbsp;Singleton&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Singleton instance=&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Singleton()&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Singleton Instance&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;get&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;if&lt;/span&gt;&amp;nbsp;(instance==&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;instance =&amp;nbsp;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&amp;nbsp;Singleton();&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;return&lt;/span&gt;&amp;nbsp;instance;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;Please note that the above implementation is not thread safe. Means to say that if&amp;nbsp;&lt;/span&gt;Two different threads could both have evaluated the test&amp;nbsp;&lt;code&gt;&lt;span&gt;if (instance==null)&lt;/span&gt;&lt;/code&gt;&amp;nbsp;and found it to be true, then both create instances, which violates the singleton pattern. Note that in fact the instance may already have been created before the expression is evaluated, but the memory model doesn't guarantee that the new value of instance will be seen by other threads unless suitable memory barriers have been passed.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: xx-small;"&gt;&lt;strong&gt;Thread safe Singleton implementation.&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;sealed&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&lt;/span&gt; Singleton&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; Singleton instance=&lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;readonly&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;object&lt;/span&gt;&lt;/span&gt; padlock = &lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;object&lt;/span&gt;&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: 'Courier New'; font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Singleton()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: 'Courier New'; font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; Singleton Instance&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;get&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;lock&lt;/span&gt;&lt;/span&gt; (padlock)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;if&lt;/span&gt;&lt;/span&gt; (instance==&lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;instance = &lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&lt;/span&gt; Singleton();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;return&lt;/span&gt;&lt;/span&gt; instance;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;This implementation is thread-safe. The thread takes out a lock on a shared object, and then checks whether or not the instance has been created before creating the instance. This takes care of the memory barrier issue (as locking makes sure that all reads occur logically after the lock acquire, and unlocking makes sure that all writes occur logically before the lock release) and ensures that only one thread will create an instance (as only one thread can be in that part of the code at a time - by the time the second thread enters it,the first thread will have created the instance, so the expression will evaluate to false). Unfortunately, performance suffers as a lock is acquired every time the instance is requested.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;Note that instead of locking on&amp;nbsp;&lt;/span&gt;&lt;span&gt;typeof(Singleton)&lt;/span&gt;&lt;span&gt;&amp;nbsp;as some versions of this implementation do, I lock on the value of a static variable which is private to the class. Locking on objects which other classes can access and lock on (such as the type) risks performance issues and even deadlocks. This is a general style preference of mine - wherever possible, only lock on objects specifically created for the purpose of locking, or which document that they are to be locked on for specific purposes (e.g. for waiting/pulsing a queue). Usually such objects should be private to the class they are used in. This helps to make writing thread-safe applications significantly easier.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;strong&gt;&lt;span style="font-size: xx-small;"&gt;thread-safety using double-check locking&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;sealed&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&lt;/span&gt; Singleton&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; Singleton instance=&lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;readonly&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;object&lt;/span&gt;&lt;/span&gt; padlock = &lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&lt;/span&gt; &lt;span class="referencetype"&gt;&lt;span style="color: #0000cc;"&gt;object&lt;/span&gt;&lt;/span&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: 'Courier New'; font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Singleton()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: 'Courier New'; font-size: xx-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&lt;/span&gt; &lt;span class="modifier"&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&lt;/span&gt; Singleton Instance&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;get&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;if&lt;/span&gt;&lt;/span&gt; (instance==&lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;lock&lt;/span&gt;&lt;/span&gt; (padlock)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;if&lt;/span&gt;&lt;/span&gt; (instance==&lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;null&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;instance = &lt;span class="keyword"&gt;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&lt;/span&gt; Singleton();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="statement"&gt;&lt;span style="color: #0000cc;"&gt;return&lt;/span&gt;&lt;/span&gt; instance;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-size: xx-small;"&gt;&lt;span style="font-family: 'Courier New';"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;implementation attempts to be thread-safe without the necessity of taking out a lock every time. Unfortunately, there are four downsides to the pattern:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;It's easy to get wrong. The pattern needs to be pretty much exactly as above - any significant changes are likely to impact either performance or correctness.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;It still doesn't perform as well as the later implementations.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;thread-safe without using locks&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="color: #0000cc; font-family: 'Courier New'; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;sealed&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&amp;nbsp;Singleton&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;readonly&lt;/span&gt;&amp;nbsp;Singleton instance=&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&amp;nbsp;Singleton();&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// Explicit static constructor to tell C# compiler&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// not to mark type as beforefieldinit&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Singleton()&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Singleton()&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Singleton Instance&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;get&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;return&lt;/span&gt;&amp;nbsp;instance;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;As you can see, this is really is extremely simple - but why is it thread-safe and how lazy is it? Well, static constructors in C# are specified to execute only when an instance of the class is created or a static member is referenced, and to execute only once per AppDomain. Given that this check for the type being newly constructed needs to be executed whatever else happens, it will be faster than adding extra checking as in the previous examples. There are a couple of wrinkles, however:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type="disc"&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;It's not as lazy as the other implementations. In particular, if you have static members other than&amp;nbsp;&lt;/span&gt;&lt;span&gt;Instance&lt;/span&gt;&lt;span&gt;, the first reference to those members will involve creating the instance. This is corrected in the next implementation.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;There are complications if one static constructor invokes another which invokes the first again. Look in the .NET specifications (currently section 9.5.3 of partition II) for more details about the exact nature of type initializers - they're unlikely to bite you, but it's worth being aware of the consequences of static constructors which refer to each other in a cycle.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;The laziness of type initializers is only guaranteed by .NET when the type isn't marked with a special flag called&amp;nbsp;&lt;/span&gt;&lt;span&gt;beforefieldinit&lt;/span&gt;&lt;span&gt;. Unfortunately, the C# compiler (as provided in the .NET 1.1 runtime, at least) marks all types which don't have a static constructor (i.e. a block which looks like a constructor but is marked static) as&amp;nbsp;&lt;/span&gt;&lt;span&gt;beforefieldinit&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;/span&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span&gt;One shortcut you can take with this implementation (and only this one) is to just make&amp;nbsp;&lt;/span&gt;&lt;span&gt;instance&lt;/span&gt;&lt;span&gt;&amp;nbsp;a public static readonly variable, and get rid of the property entirely. This makes the basic skeleton code absolutely tiny! Many people, however, prefer to have a property in case further action is needed in future, and JIT inlining is likely to make the performance identical. (Note that the static constructor itself is still required if you require laziness.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;strong&gt;&lt;span style="font-size: x-small;"&gt;fully lazy instantiation&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="color: #0000cc; font-family: 'Courier New'; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;sealed&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&amp;nbsp;Singleton&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Singleton()&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Singleton Instance&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;get&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;return&lt;/span&gt;&amp;nbsp;Nested.instance;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;class&lt;/span&gt;&amp;nbsp;Nested&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// Explicit static constructor to tell C# compiler&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: green;"&gt;// not to mark type as beforefieldinit&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;Nested()&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000cc;"&gt;internal&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color: #0000cc;"&gt;readonly&lt;/span&gt;&amp;nbsp;Singleton instance =&amp;nbsp;&lt;span style="color: #0000cc;"&gt;new&lt;/span&gt;&amp;nbsp;Singleton();&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 10pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-2585921935537053044?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2585921935537053044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/2585921935537053044'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/thread-safe-singleton-pattern.html' title='Thread safe singleton Pattern'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-6265832621156445063</id><published>2011-08-14T19:41:00.002+05:30</published><updated>2011-08-14T19:41:31.824+05:30</updated><title type='text'>Model-View-ViewModel Pattern</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="font-size: 16px; margin-bottom: -10px;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;In conventional user interface programming techniques (as we know it from WinForms) we usually add event handlers to controls and implement the logic of a view in the code-behind. It is the most simple and fastest way to get a functional user interface. But this approach has some disadvantages:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Presentation and logic are tightly coupled&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Replacing a control on the view often requires code changes&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;You cannot have more than one view sharing the same logic&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;To test the user interface logic you need to do complex UI testing.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style="font-size: 16px; margin-bottom: -10px;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Introducing the Model-View-ViewModel pattern&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;WPF brings up a very flexible and powerful databinding framework and this favors a new pattern how to bind presentation and logic together.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;The idea of the MVVM pattern is the following:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;A&amp;nbsp;&lt;strong&gt;model&lt;/strong&gt;&amp;nbsp;that contains the data&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;A passive&amp;nbsp;&lt;strong&gt;view-model&lt;/strong&gt;&amp;nbsp;that collects and prepares the data so that is can easy be consumed by the view.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;And a&amp;nbsp;&lt;strong&gt;view&lt;/strong&gt;&amp;nbsp;that is defined in XAML and should not have any logic in the code-behind. It binds to the view-model by only using data binding.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;img alt="" src="http://www.bhargavapandey.com/image.axd?picture=2010%2f8%2fmvvm.png" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial;" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;From MVVM in a nutshell--&lt;br /&gt;&lt;br /&gt;The VM (ViewModel) is effectively an Observable. It has no idea that the View is observing the state changes that it is broadcasting via the INotifyPropertyChanged interface (basically an interface to define any objects that fire events when their properties change.)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;The ViewModel knows about the Model, and is able to retrive and send information back and forth to it through some kind of repository interface. Remember that when the viewmodel is retrieving information, it is updating it's own properties and firing events for the View to observe. This is why databinding in WPF is so amazing and easy (compared to ASP.net and Winforms at least!)&lt;br /&gt;&lt;br /&gt;What this pattern also buys us, is the ability to test the ViewModel in isolation, without having the View in the way (we don't have to fire up our application just to test it, we can pretend like our test suite is basically a user interacting with the View and "Poking" the ViewModel.)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-6265832621156445063?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/6265832621156445063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/6265832621156445063'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/model-view-viewmodel-pattern.html' title='Model-View-ViewModel Pattern'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-1285377012832320446</id><published>2011-08-14T19:40:00.002+05:30</published><updated>2011-08-14T19:40:38.318+05:30</updated><title type='text'>Partial Class in Visual Studio .NET 2005, ASP.NET 2.0</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: calibri, arial; font-size: 15px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Visual Studio .NET 2005, ASP.NET 2.0, shipped with a lesser-known functionality called a “Partial Class”. A Partial class is a class defined in 2 or more files. Each source file contains a section of the class which will combine when the application is compiled.&lt;br /&gt;In previous versions of Visual Studio classes are confined to a single file. It was not possible to split up a single class into multiple files. In order to split up a class we have to use the keyword “Partial”. The purpose of the Partial Class is to allow more than one programmer to write code for the same class, at the same time.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;view plaincopy to clipboardprint?&lt;br /&gt;&amp;nbsp;namespace Examples&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void GetName()&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Employee Name is Ram");&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void getAge()&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Employee Age is 24");&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee emp = new Employee();&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emp.GetName();&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emp.getAge();&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Output&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;img alt="" src="http://www.bhargavapandey.com/image.axd?picture=2010%2f9%2foutput.jpg" style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial;" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;/span&gt;In the above example, the Employee class is split into 2 parts. The first part defines the GetName() method, and the second part defines the GetAge() method. When you compile this program both parts will be combined and compiled.&lt;br /&gt;The important point to remember is both sections use the keyword Partial and the public access modifier.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;Points to considered on creating Partial Class&lt;br /&gt;All the parts must use the partial keyword.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;During compile time, all the parts should be available to form the final class.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;All the parts should have the same access modifiers. – Public, Private, Protected and etc.,&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Any member declared in the partial class is available to all other parts.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;If any part is abstract, the entire class is abstract&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;If any part is sealed, then entire class is sealed.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;If any part has Inheritance, then it applies to the entire class.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;We can create the Partial Structs, Interfaces and methods in the same way as we create partial classes.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;Different parts of the partial calls can inherit from different interfaces.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In the above example two parts are declared as public.&amp;nbsp; In the following example we will create one part as abstract.&lt;br /&gt;view plaincopy to clipboardprint?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;namespace Examples&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void GetName()&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Employee Name is Ram");&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abstract partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void getAge()&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Employee Age is 24");&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee emp = new Employee();&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Output&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;If you create an object for the Employee class, you will get the following error:&lt;br /&gt;“Cannot create an instance of the abstract class or interface Examples.Employee”.&amp;nbsp;&lt;br /&gt;This is because the second part is declared as abstract, so the whole class became abstract. Hence you cannot create an object.&lt;br /&gt;We can create nested classes as partial class; even when the main class is not partial.&lt;br /&gt;view plaincopy to clipboardprint?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;class MainClass&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; public partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void getName() { }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; public partial class Employee&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void getAge() { }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial Methods&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial methods are methods placed inside partial classes. The implementation is optional. If the implementation is not provided then the method and all the calls to the method are removed at compile time; code inside the partial class can use a partial method.&lt;br /&gt;view plaincopy to clipboardprint?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;// Definition in file1.cs&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;partial void onNameChanged();&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;// Implementation in file2.cs&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;partial void onNameChanged()&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // method body&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Important Points in Partial Method&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial method declarations must begin with partial keyword.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;The return type of the partial class should be void&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial methods cannot have the out parameter, but can have the ref parameter.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial methods can be private but they cannot be virtual.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana, geneva;"&gt;&lt;span style="font-size: x-small;"&gt;Partial classes cannot be extern.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-1285377012832320446?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1285377012832320446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1285377012832320446'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2011/08/partial-class-in-visual-studio-net-2005.html' title='Partial Class in Visual Studio .NET 2005, ASP.NET 2.0'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-9021416783634608729.post-1164807280699472707</id><published>2010-01-30T18:15:00.002+05:30</published><updated>2010-05-05T21:21:37.921+05:30</updated><title type='text'>Credit Crad Fraud, story with me.</title><content type='html'>Almost two year back I was having around 10 credit card of different bank, and now I am having only one, and for that too I have requested the bank to lower down my credit limit.&lt;br /&gt;&lt;br /&gt;All this happened because of fraud happened with my card account. I am not sure why such type of this happens with me only, I am still searching the reason for this, when I will find will surly share with all of you.&lt;br /&gt;&lt;br /&gt;The story starts around 1.5 year back, one of my friend was in the rural area where he was not having the internet, so he called me to book the flower for his wife birthday from internet. I go ahead and start the process, chosen the flower and used my credit card to make the payment. But the payments payment fails (as indicated by the site). So I tried the second time and again the payment fails.&lt;br /&gt;&lt;br /&gt;But after few second I received a SMS on my mobile that transaction of amount Rs. 1244 happened using your credit card ending with XXXX number. The amount was just double of the amount I was trying to pay through the net for booking the flower.&lt;br /&gt;&lt;br /&gt;Quickly I called the customer care of the credit card bank that this was a fail transaction and please do not bill it to my credit card. I have also mail the screen shot of failed transaction. The customer care representative told me to wait for at least two day to confirm this transaction. I was surprised to hear this, and confused for what they are waiting. Any way I wait for 2 day and after that when I saw my credit card statement online there was a confirmed transaction of 1244. I again called the customer care and he advised me to raise he dispute by filling the dispute form and fax them. I did and received a mail that it will be resolved within 40 days.&lt;br /&gt;&lt;br /&gt;In mean time they generated the credit card statement and charged that amount to me, where as they have confirmed me at time of our conversations with customer care that this amount will not be included in my statement but they did. Not only they send me the statement but they also start calling me to pay that amount. One of them has even said me that they know how to recover the money from customer, I did that recoding of this talk over the phone and mailed he same to customer care. But nothing happened situation was as it is, I was getting the call form bank to pay the amount but I had already decided not to pay as I have not done this transaction.&lt;br /&gt;&lt;br /&gt;After around 2 month I received a packet form the bank bearing detail of this transaction, where it was mentioned that someone form Gurgoan has purchased a pen drive for the same site of cast of 1244. The name, address and mobile number of hat person was also mentioned in that document.&lt;br /&gt;&lt;br /&gt;It was enough for me to prove that this is not me who done this transaction. I called to that person and told him that he done fraud on my credit card. At first time he denied and start threatening me, but when gave him all the details about his address, shipment detail, item name, date etc. which were mentioned in the document I received the person calm down and start negotiating me. I just asked him to send a letter to bank and keep me in the copy list; he did it and the story end here. I asked bank to close the card but they assure me that this will not happen again so I say yes to send me another card.&lt;br /&gt;&lt;br /&gt;I received another card within3 day, but I done a single transaction to on a petrol pump and keep that card safe.&lt;br /&gt;&lt;br /&gt;After few month the next story start, this time the matter was more serious not related to me but relate if we think this was related to security hole in our airline company also.&lt;br /&gt;&lt;br /&gt;Around the 11:30 AM of 10th of august 2009 when I was sitting in my office and fortunately the card was with me at that time. I received a SMS form bank saying thank you for using you card for a transaction of amount Rs 5420 on ezeego travel. I was surprised to see his SMS, and check my account online and saw that yes there was a transaction done of said amount just before 3 minute. So repeated the same process called the customer care and ask told them all and requested them to deny this. But again same answer that they cannot deny the transaction and I have to wait for 2 day so that transaction is to be confirm. Even till today I didn’t get the answer that what they mean for transaction is to be confirmed. Any way after 2 day when he transaction was confirmed I repeated the same procedure, downloaded the dispute form fill signed and mal back to them and keep a scanned copy of same with me.&lt;br /&gt;&lt;br /&gt;I keep calling to customer care to know the stats but they asked me to wait for 5 day. After 5 day I received a mail saying that they have received the mail and case will be resolved within 40 day.&lt;br /&gt;&lt;br /&gt;After around 30-35 day (after receiving the statement bearing the amount) I called customer care why the dispute amount is here (as they have accepted that this is the dispute amount) but they advice to pay the amount but this time I had decide I m not going to pay, will raise this to consumer forum, RBI and media.&lt;br /&gt;&lt;br /&gt;After 40 day when I called to know the status the customer care representative told that he is forwarding this request to concerned department, my god till 40 day this case was pending somewhere else.&lt;br /&gt;&lt;br /&gt;Anyway process gain restarted but this time I was keeping record of all mail and was in touch with Ezeego travel, and aske given them all the details. The ezzego was more active in all this process I was keeping them also in the loop.&lt;br /&gt;&lt;br /&gt;After 50 day I directly called to ezeego to know the details, and they assure me to get back to me by evening, and they did, they provided me all the detail, name of the person, address, mobile number, email address, and traveling details of that person on goair. The person has traveled from Delhi to Mumbai by go air in moth of august.&lt;br /&gt;&lt;br /&gt;I mail back to bank with all detail so that this case can be close as soon as possible, But in mean time the second statement of my credit card was generated and this time they have charge late payments, finance charge etc of around 1800 again the transaction and called me on me cell phone to pay the amount. I denied paying. They handover this to their recovery agent and agent start calling and threatening me to pay, but this time I was well prepare to teach the lesson to bank. So I keep recording of all call and mail. And send it to bank, and included news channel in the cc list.&lt;br /&gt;&lt;br /&gt;But I think no one ready to help me, I personally approached to media and told the entire story but I didn’t get help form hem also.&lt;br /&gt;&lt;br /&gt;Upon calling to the fraud person some leady was picking up the phone. When I mail to that person the mal bounced. So i decide to go o he address mention, and you can guess what happened .the address was also fake. The house number mention was the number of a vacant plot where there was no sign of any building even around that plot. I was very disappointed,&lt;br /&gt;&lt;br /&gt;After all this I have decide to reach to RBI Banking Ombudsman, and provided all the detail t RBI with proof of all the record.&lt;br /&gt;&lt;br /&gt;After few day, this was month of Nov 2009 (I think 40 day for bank is 4 Month LOL J), I received mail from bank saying that this case is being closed in m favor and all amount will be reverted back.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Surprisingly in month of Jan 2010 I receive mail from RBI that a meeting has been fixed with RBI on the 1st Feb 2010 regarding this case. And after 2 day I also receive a call from bank to reply to all saying that this case has been closed.&lt;br /&gt;&lt;br /&gt;I was tired of all these so I reply to all and the story end.&lt;br /&gt;&lt;br /&gt;But this happening, forced me to cancel all my credit card. Now I have a single card and reduced he limit of that to very low.&lt;br /&gt;&lt;br /&gt;But this force me to think about the security threat happened during all this. How he go-air has allows the person to travel, why they didn’t do the security check, or that person was from Go-Air itself. Our government is saying that they are tightening the security on air travel and in spite of all this happened,&lt;br /&gt;&lt;br /&gt;I think now it time for our air-line to tighten the security at airport even in case of domestic travel too. And would like to ask bank and Credit Card Company they now they should include the requirement of PIN in case of Credit Card too.&lt;br /&gt;&lt;br /&gt;This was all about my case&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9021416783634608729-1164807280699472707?l=www.bhargavapandey.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1164807280699472707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9021416783634608729/posts/default/1164807280699472707'/><link rel='alternate' type='text/html' href='http://www.bhargavapandey.com/2010/01/credit-crad-fraud-story-with-me.html' title='Credit Crad Fraud, story with me.'/><author><name>Bhargava Kr Pandey</name><uri>http://www.blogger.com/profile/12033407587520832226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_l7kyivaxDKI/SVcyzNq_cDI/AAAAAAAAAhE/3iAAubXOdFI/S220/IMG_0777.JPG'/></author></entry></feed>
