<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://beyondrelational.com/live/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'VisualStudio2010'</title><link>http://beyondrelational.com/live/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=VisualStudio2010&amp;orTags=0</link><description>Search results matching tag 'VisualStudio2010'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>My first video for code refactoring in visual studio 2010</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2012/01/28/my-first-video-for-code-refactoring-in-visual-studio-2010.aspx</link><pubDate>Sat, 28 Jan 2012 21:07:59 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:15256</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;I have been planning this since long but now Its happened. I have created a video for visual studio 2010 code refactoring features. I have made this video public. Following is a link for that.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share"&gt;http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here is the video..&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:3b089b24-9cf1-45e3-99b9-0da13937edfe" class="wlWriterSmartContent"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share" target="_new"&gt;&lt;img src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/videocfc55ea0eff6_5F00_1C171F5A.jpg" style="border-style:none;" alt="" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;Please see the video and let me know your feedback. I am not a trained professional in this but I have tried to create it. Hope fully I will master this technique in some time. Stay tuned for more. Till then Happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2012%2f01%2f29%2fmy-first-video-for-code-refactoring-in-visual-studio-2010.aspx&amp;amp;title=My+first+video+for+code+refactoring+in+visual+studio+2010"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2012/01/29/my-first-video-for-code-refactoring-in-visual-studio-2010.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>NuGet package with multiple projects</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/09/23/nuget-package-with-multiple-projects.aspx</link><pubDate>Fri, 23 Sep 2011 19:55:47 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:13747</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;Before some day one of my friend asked me to install NuGet in project another then startup project. At that time I don’t have any idea about it. So I did some R and D on web and found one easiest way to do it. So let’s first create a solution where we have more then one project in single solution. I have created a new solution and create three project in single solution as below. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;MyApplication- Main web application project. &lt;/li&gt;    &lt;li&gt;MyApplication.Business- This project contains all business logic classes of application &lt;/li&gt;    &lt;li&gt;MyApplication.Data- This project contains all data access layers classes of application &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Its looks like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ThreeSolutionForNuget_5F00_7B0981E6.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Nuget Package with multiple solutions and adding NuGet Package to more then one project" border="0" alt="Nuget Package with multiple solutions and adding NuGet Package to more then one project" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ThreeSolutionForNuget_5F00_thumb_5F00_7FFB6F99.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now I want to add EFCodeFirst NuGet package to MyApplication.Data project as I want to use entity framework code first for database operations. To add new package with in the project. you can select project and then click ‘Manage NuGet Packages’ like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ManageNuGetPakcage_5F00_69045052.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Manage Nuget Pakcage with multiple project" border="0" alt="Manage Nuget Pakcage with multiple project" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ManageNuGetPakcage_5F00_thumb_5F00_0B301FDC.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you click it will show a dialog for NuGet Packages&amp;#160; like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/NuGetPacakge_5F00_577379B1.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="NuGetPacakge" border="0" alt="NuGetPacakge" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/NuGetPacakge_5F00_thumb_5F00_2226534D.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have selected EFCodeFirst and Once I clicked ‘Install’ . It has added reference to MyApplication.Data Project like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EntityFramework_5F00_18098A24.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Entity Framework Nuget Package with multiple solution" border="0" alt="Entity Framework Nuget Package with multiple solution" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EntityFramework_5F00_thumb_5F00_79E71C96.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s it. It’s very easy. Hope you like it..Stay tuned for more.. Till then happy programming and Namaste!!!.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f09%2f24%2fnuget-package-with-multiple-projects.aspx&amp;amp;title=NuGet+package+with+multiple+projects"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/09/24/nuget-package-with-multiple-projects.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Visual Studio 2010 feature post list</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/08/27/visual-studio-2010-feature-post-list.aspx</link><pubDate>Sat, 27 Aug 2011 21:03:33 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:13274</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;Before some days one of my friend ask me about my visual Studio 2010 features post. So this post is about my Visual Studio 2010 posts. I have done lots of post about features of visual studio 2010 and Following is complete list of it.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/08/visual-studio-2010-color-theme-editor.html" target="_blank"&gt;Visual Studio 2010 Color Theme Editor- Customize look of visual studio&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/07/visual-studio-2010-styles.html" target="_blank"&gt;Visual Studio 2010 styles&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/08/surround-with-feature-in-visual-studio.html" target="_blank"&gt;Surround with feature in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/07/sql-management-studio-in-visual-studio.html" target="_blank"&gt;SQL Management Studio in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/07/box-selection-in-visual-studio-2010.html" target="_blank"&gt;Box Selection in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/06/code-refactoring-with-visual-studio.html" target="_blank"&gt;Code refactoring with Visual Studio 2010 Part-1&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/06/code-refactoring-with-visual-studio_27.html" target="_blank"&gt;Code refactoring with Visual Studio 2010 Part-2&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/06/code-refactoring-with-visual-studio_28.html" target="_blank"&gt;Code refactoring with Visual Studio 2010 Part-3&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/06/code-refactoring-with-visual-studio_29.html" target="_blank"&gt;Code refactoring with Visual Studio 2010 Part-4&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/visual-studio-2010-and-umlunified.html" target="_blank"&gt;Visual Studio 2010 and UML(Unified Modeling Language) Part-I&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/05/task-list-window-in-visual-studio-2010.html" target="_blank"&gt;Task list window in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/05/html5-intellisense-in-visual-studio.html" target="_blank"&gt;HTML5 Intellisense in Visual Studio 2010/2008&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/view-call-hierarchy-window-in-visual.html" target="_blank"&gt;View Call Hierarchy window in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/pin-features-while-debugging-in-visual.html" target="_blank"&gt;Pin features while debugging in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/historical-debugging-intellitrace-on.html" target="_blank"&gt;Historical Debugging (Intellitrace) on Visual Studio 2010 Ultimate Part-1&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/historical-debugging-intellitrace-on_08.html" target="_blank"&gt;Historical Debugging (Intellitrace) on Visual Studio 2010 Ultimate Part-2&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/04/variable-reference-code-highlighting.html" target="_blank"&gt;Variable Reference Code Highlighting and Hide selection features of Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2011/01/html-and-java-script-code-snippets-in.html" target="_blank"&gt;HTML and Java Script code snippets in Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2010/04/visual-studio-2010-new-feature-generate.html" target="_blank"&gt;Visual Studio 2010 New Feature-Generate From usage&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2010/03/visual-studio-2010-automatically-adjust.html" target="_blank"&gt;Visual Studio 2010-Automatically Adjust Visual Experience&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2009/11/visual-studio-2010-new-features.html" target="_blank"&gt;Visual Studio 2010- New Features Selected Text&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2009/11/new-publish-setting-dialog-in-visual.html" target="_blank"&gt;New publish setting dialog in visual studio 2010 beta 2&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;h5&gt;&lt;a href="http://jalpesh.blogspot.com/2010/03/rename-feature-in-visual-web-developer.html" target="_blank"&gt;Rename feature in Visual Web Developer 2010/Visual Studio 2010&lt;/a&gt;&lt;/h5&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;h5&gt;&amp;#160;&lt;/h5&gt;  &lt;ol&gt;    &lt;/ol&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f08%2f28%2fvisual-studio-2010-feature-post-list.aspx&amp;amp;title=Visual+Studio+2010+feature+post+list"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/08/28/visual-studio-2010-feature-post-list.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Visual Studio 2010 Color Theme Editor- Customize look of visual studio</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/08/12/visual-studio-2010-color-theme-editor-customize-look-of-visual-studio.aspx</link><pubDate>Fri, 12 Aug 2011 19:59:58 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:13119</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;We have all love Visual Studio 2010 and I am sure you all want to change color for menus, toolbars and title etc. Today I have found one of the most interesting Extension for Visual studio 2010 from which you can manage all this things. Don’t believe me I’m sure you won’t believe but this reality and You can change the look of your favorite visual studio look and feel. There is a new extension called “Visual Studio Color Theme Editor”&amp;#160; from which you can do all this stuff. Here is the link for that.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378"&gt;http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you download and install this link a Theme Menu will be added to Visual Studio like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ThemeMenu_5F00_6A6EF773.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="ThemeMenu" border="0" alt="ThemeMenu" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ThemeMenu_5F00_thumb_5F00_2F677910.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are 8 themes provided by the Default. You can choose any one of them. Lets choose Emerald theme for visual studio and It will look like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EmerlandThemeForVisualStudio_5F00_0961A2ED.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="EmerlandThemeForVisualStudio" border="0" alt="EmerlandThemeForVisualStudio" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EmerlandThemeForVisualStudio_5F00_thumb_5F00_301F9360.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Isn’t that great?. Even you can also design your own theme also. Click on Theme-&amp;gt;Customize colors and then It will popup a dialog like following. where you can will get lots of things for which you can customize the color.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/CustomisedColorDialogForVisualStudio_5F00_0A19BD3D.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="CustomisedColorDialogForVisualStudio" border="0" alt="CustomisedColorDialogForVisualStudio" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/CustomisedColorDialogForVisualStudio_5F00_thumb_5F00_36269461.png" width="504" height="379" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Isn’t that Great. Hoped You liked it. Stay tuned for more..Till then happy programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f08%2f13%2fvisual-studio-2010-color-theme-editor-customize-look-of-visual-studio.aspx&amp;amp;title=Visual+Studio+2010+Color+Theme+Editor-+Customize+look+of+visual+studio"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/08/13/visual-studio-2010-color-theme-editor-customize-look-of-visual-studio.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Surround with feature in Visual Studio 2010</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/08/02/surround-with-feature-in-visual-studio-2010.aspx</link><pubDate>Tue, 02 Aug 2011 09:09:28 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:13026</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;Everyday I am discovering something new with Visual Studio 2010 and today Once again I have discovered a new feature called “Surround with” feature. This feature is quite useful when you have very big HTML element and You want to surround it some HTML or ASP.NET element i.e. Suppose there is one very big div there and you want to add update panel for Ajax . So let’s take a Simple Example over there. I am having a div which contain very big HTML in it. Like following.&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;div&amp;gt;
    Very big HTML here.
&amp;lt;/div&amp;gt;&lt;/pre&gt;

&lt;p&gt;Now let&amp;#39;s put that div into update panel with Surround with feature. You can right click and click Surround With or You can directly have shortcut Ctrl+k, Ctrl +S like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SurroundMenu_5F00_7B705B28.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SurroundMenu" border="0" alt="SurroundMenu" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SurroundMenu_5F00_thumb_5F00_0B1FCA60.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now once you click it It will popup three things. 1) ASP.NET 2) ASP.NET MVC 2 and 3) HTML. You can select element of any of that like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SurroundPopup_5F00_45D74D69.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SurroundPopup" border="0" alt="SurroundPopup" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SurroundPopup_5F00_thumb_5F00_37B85E6C.png" width="504" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am going select ASP.NET as we want to put Update panel over there. Once you click ASP.NET It will popup elements of asp.net. Here I have selected update panel as I want to put update panel covering this&amp;#160; div like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/UpdatePanel_5F00_5F2F2AD6.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="UpdatePanel" border="0" alt="UpdatePanel" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/UpdatePanel_5F00_thumb_5F00_50A408E4.png" width="504" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now once you click update panel it will put Update panel and div will be in content template of Update panel. Now our code will like following.&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;asp:UpdatePanel runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;ContentTemplate&amp;gt;
        &amp;lt;div&amp;gt;
            Very big HTML here.
        &amp;lt;/div&amp;gt;
    &amp;lt;/ContentTemplate&amp;gt;
&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/pre&gt;
That&amp;#39;s it. Isn&amp;#39;t that cool?. Hope you like it. Stay tuned for more.. Till then Happy Programming.. 


&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f08%2f02%2fsurround-with-feature-in-visual-studio-2010.aspx&amp;amp;title=Surround+with+feature+in+Visual+Studio+2010"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/08/02/surround-with-feature-in-visual-studio-2010.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>&amp;quot;The statement terminated. The maximum recursion 100 has been exhausted before statement completion&amp;quot; with CTE in SQL server</title><link>http://beyondrelational.com/live/blogs/paresh/archive/2011/07/31/quot-the-statement-terminated-the-maximum-recursion-100-has-been-exhausted-before-statement-completion-quot-with-cte-in-sql-server.aspx</link><pubDate>Sun, 31 Jul 2011 10:20:00 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:13007</guid><dc:creator>pprajapati</dc:creator><description>&lt;div dir="ltr" style="text-align:left;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="color:#0b5394;"&gt;Problem :&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;When i was working with stored procedures to get the hierarchical data in SQL Server 2005, I did one mistake.&amp;nbsp;Let me &amp;nbsp;explain the what was that mistake. I don&amp;#39;t want to repeat the same. &lt;br /&gt;&lt;br /&gt;I have also posted one post for the &lt;a href="http://beyondrelational.com/blogs/paresh/archive/2011/06/28/maxrecursion-option-and-cte-common-table-expression-sql-server-2005.aspx"&gt;CTE and MAXRECURSION option.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;I was using CTE (Common table expression ) to get the hierarchical data and forgot to put&amp;nbsp;MAXRECURSION option in t-sql statement inside the stored procedure. &lt;br /&gt;&lt;br /&gt;It was working very well when the hierarchical depth is less than 100, but it was creating issue when hierarchical depth grater than 100. &lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0b5394;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;An Example&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;.
&lt;pre class="brush:sql"&gt;IF ( Object_id(&amp;#39;CTEMaxLevelTab&amp;#39;) &amp;gt; 0 )
  DROP TABLE CTEMaxLevelTab

GO

CREATE TABLE CTEMaxLevelTab
  (
     ChildId   BIGINT IDENTITY(1, 1)
     ,ParentId BIGINT
  )

GO

-- Inserting demo records
INSERT INTO CTEMaxLevelTab
            (ParentId)
SELECT TOP 500
  NULL
FROM   sys.sysobjects a
       CROSS JOIN sys.sysobjects b

GO

UPDATE CTEMaxLevelTab
SET  ParentId = ChildId - 1

GO
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;Now write the below code and execute in your query analyzer and see the what&amp;#39;s result with the script. &lt;br /&gt;&lt;br /&gt;
&lt;pre class="brush:sql"&gt;;WITH cteLevels
AS
(
SELECT
  ChildId   AS Child
  ,ParentId AS Parent
  ,1        AS [Level]
FROM   CTEMaxLevelTab 
WHERE CHILDID = 1


UNION ALL

SELECT
  ChildId      AS Child
  ,ParentId    AS Parent
  ,[Level] + 1 AS [Level]
FROM   CTEMaxLevelTab
       INNER JOIN cteLevels
         ON ( ParentId = Child ) 


)


SELECT
  *
FROM   cteLevels
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-Gk4EjKVSyY8/Tbf7FG-wuzI/AAAAAAAAAZ8/RV4A5zcCMPI/s1600/Max_Rec_CTE.PNG"&gt;&lt;img height="307" width="640" src="http://2.bp.blogspot.com/-Gk4EjKVSyY8/Tbf7FG-wuzI/AAAAAAAAAZ8/RV4A5zcCMPI/s640/Max_Rec_CTE.PNG" border="0" alt="" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;This is the error occurred after 100 recursion reached. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-47vGOdw2drQ/Tbf6jaTxtSI/AAAAAAAAAZ0/5WwcomtmLug/s1600/Max_Rec_CTE_Error.PNG"&gt;&lt;img height="72" width="640" src="http://4.bp.blogspot.com/-47vGOdw2drQ/Tbf6jaTxtSI/AAAAAAAAAZ0/5WwcomtmLug/s640/Max_Rec_CTE_Error.PNG" border="0" alt="" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span style="color:#0b5394;"&gt;Solution :&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now going to close the success and resolve the issue with Max-recursion option. Let&amp;#39;s run the below revised script and see you in success. &lt;br /&gt;&lt;br /&gt;
&lt;pre class="brush:sql"&gt;;WITH cteLevels
AS
(
SELECT
  ChildId   AS Child
  ,ParentId AS Parent
  ,1        AS [Level]
FROM   CTEMaxLevelTab 
WHERE CHILDID = 1


UNION ALL

SELECT
  ChildId      AS Child
  ,ParentId    AS Parent
  ,[Level] + 1 AS [Level]
FROM   CTEMaxLevelTab
       INNER JOIN cteLevels
         ON ( ParentId = Child ) 


)


SELECT
  *
FROM   cteLevels
OPTION (MAXRECURSION 0); 
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-1rWAm7SBx7g/Tbf7nUP7s3I/AAAAAAAAAaE/hl24-6AU70A/s1600/Max_Rec_CTE_Sucess.PNG"&gt;&lt;img height="392" width="640" src="http://2.bp.blogspot.com/-1rWAm7SBx7g/Tbf7nUP7s3I/AAAAAAAAAaE/hl24-6AU70A/s640/Max_Rec_CTE_Sucess.PNG" border="0" alt="" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Hope you always use this option to come out from this issue. &lt;/div&gt;</description></item><item><title>Handle Exception Carefully</title><link>http://beyondrelational.com/live/blogs/pranayrana/archive/2011/07/22/handle-exception-carefully.aspx</link><pubDate>Fri, 22 Jul 2011 18:07:00 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:12921</guid><dc:creator>pranayamr</dc:creator><description>&lt;div dir="ltr" style="text-align:left;"&gt;
&lt;div dir="ltr" style="text-align:left;"&gt;
Handle Exception carefully means I am not going to discuss some rocket science about exception handling but I am going to discuss not to shadow the exception in your program. Not going to discuss more I am starting my example
&lt;pre class="brush: csharp"&gt;class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Program p = new Program();
                p.MethodA();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
            Console.ReadLine();
        }

        public void MethodA()
        {
            try
            {
                MethodB();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void MethodB()
        {
            try
            {
                MethodC();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void MethodC()
        {
            int a = 10;
            int b = 0;
            int c = 0;
            try
            {
                c = a / b;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
&lt;/pre&gt;
&lt;div dir="ltr" style="text-align:left;"&gt;
When execute the program you will get the following output as result. Yes you can able to handle the exception thrown by the method and displayed on the console.&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;
&lt;/p&gt;
&lt;a href="http://3.bp.blogspot.com/-ScumUNrSkfw/TihWUuiEDhI/AAAAAAAACbM/rStUzFnFN7Q/s1600/Exception+output+1.png"&gt;&lt;img border="0" height="130" src="http://3.bp.blogspot.com/-ScumUNrSkfw/TihWUuiEDhI/AAAAAAAACbM/rStUzFnFN7Q/s640/Exception+output+1.png" width="640" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
But the actual thing is you hiding the stack trace and each time you throw the exception by writing &lt;i&gt;throw ex&lt;/i&gt; you are creating new stack trace. So you are not able to get the actual  path from where the exception get thrown.
Now to understand the thing properly, write the program again and now replace &lt;i&gt;throw ex&lt;/i&gt; by the &lt;i&gt;throw&lt;/i&gt;
&lt;pre class="brush: csharp"&gt;class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Program p = new Program();
                p.MethodA();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
            Console.ReadLine();
        }

        public void MethodA()
        {
            try
            {
                MethodB();
            }
            catch
            {
                throw;
            }
        }

        public void MethodB()
        {
            try
            {
                MethodC();
            }
            catch
            {
                throw;
            }
        }

        public void MethodC()
        {
            int a = 10;
            int b = 0;
            int c = 0;
            try
            {
                c = a / b;
            }
            catch
            {
                throw;
            }
        }
    }
&lt;/pre&gt;
&lt;div dir="ltr" style="text-align:left;"&gt;
When execute the program get the following output&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;
&lt;/p&gt;
&lt;a href="http://3.bp.blogspot.com/-caivic8u-8A/TihWyBTyncI/AAAAAAAACbQ/buRvfp1_DvI/s1600/Exception+output+2.png"&gt;&lt;img border="0" height="172" src="http://3.bp.blogspot.com/-caivic8u-8A/TihWyBTyncI/AAAAAAAACbQ/buRvfp1_DvI/s640/Exception+output+2.png" width="640" alt="" /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
Now as you see when you replace the line there is no new stacktrace get created and you get actual path from where exception get thrown.   &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So make use of the &lt;i&gt;throw&lt;/i&gt; to get the actual path of the exception rather than using &lt;i&gt;throw ex&lt;/i&gt;&lt;/p&gt;.</description></item><item><title>Box Selection in Visual Studio 2010</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/07/22/box-selection-in-visual-studio-2010.aspx</link><pubDate>Fri, 22 Jul 2011 11:17:00 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:12920</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;Every day I am discovering something new with Visual Studio 2010 and In this post I am again going to explain you new interesting feature of Visual Studio 2010. We all required to modify the code in bulk some time and there is a new features for Visual Studio 2010 which enables to made changes in multiple line at same time. Let&amp;rsquo;s take a simple example like following.&lt;/p&gt;
&lt;pre class="brush: csharp;"&gt;using System;

namespace Parallel
{
    class Program
    {
           private int a=10;
           private int b=10;
           private int c=10;

           static void Main(string[] args)
           {

           }    
    }
}

&lt;/pre&gt;
&lt;p&gt;In above code I have three private variable a,b and c and now I want to make them protected. There is two way either I do manually one by one or I can do it with box selection and modify them together. It very easy to use this feature Press ALT+ SHIFT and draw box with help of mouse on the code which you need to modify like following.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SelectedBox_5F00_1D9C072F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SelectedBox" border="0" alt="SelectedBox" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SelectedBox_5F00_thumb_5F00_3F943D28.png" width="504" height="285" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now I want to make it protected so I started writing protected and it will modify all the line at same time like following.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ChangedCode_5F00_28A545DF.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="ChangedCode" border="0" alt="ChangedCode" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ChangedCode_5F00_thumb_5F00_75395CB5.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And now my code is like following.&lt;/p&gt;
&lt;pre class="brush: csharp;"&gt;using System;

namespace Parallel
{
    class Program
    {
           protected int a=10;
           protected int b=10;
           protected int c=10;

           static void Main(string[] args)
           {

           }    
    }
}
&lt;/pre&gt;
&lt;p&gt;That&amp;#39;s it. Hope you like it&amp;hellip; Stay tuned for more&amp;hellip;Till then Happy programming. 
&lt;/p&gt;
&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;
&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f07%2f22%2fbox-selection-in-visual-studio-2010.aspx&amp;amp;title=Box+Selection+in+Visual+Studio+2010"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/07/22/box-selection-in-visual-studio-2010.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>New Improved IntelliSense with Visual Studio 2010</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/07/17/new-improved-intellisense-with-visual-studio-2010.aspx</link><pubDate>Sun, 17 Jul 2011 12:02:23 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:12879</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;I have posted lot many things about Visual Studio 2010 features&amp;#160; because its a great IDE(Integrated Development Environment).Today I am going to write about IntelliSense improvement in Visual Studio 2010. Today when I was working with Visual Studio 2008 for a old project(Nowadays I am working with Visual Studio 2010), I have found new improve IntelliSense feature in Visual Studio 2010.&lt;/p&gt;  &lt;h3&gt;Filtering:&lt;/h3&gt;  &lt;p&gt;Visual Studio 2010 IntelliSense is filtered better than Visual Studio 2008. I have created a sample application and I am writing Console.ReadLine that you can see in following image its filtering with read only.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/Intellisense_5F00_30BDE248.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Intellisense" border="0" alt="Intellisense" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/Intellisense_5F00_thumb_5F00_4FF0634E.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In earlier version it was not possible.Hope you like it. Stay tuned for more.. Happy Programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f07%2f17%2fnew-improved-intellisense-with-visual-studio-2010.aspx&amp;amp;title=New+Improved+IntelliSense+with+Visual+Studio+2010"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/07/17/new-improved-intellisense-with-visual-studio-2010.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Code refactoring with Visual Studio 2010 Part-4</title><link>http://beyondrelational.com/live/blogs/jalpesh/archive/2011/06/29/code-refactoring-with-visual-studio-2010-part-4.aspx</link><pubDate>Wed, 29 Jun 2011 09:01:27 GMT</pubDate><guid isPermaLink="false">6e5011fa-7db5-4df3-bb79-9085c1d333b3:12731</guid><dc:creator>Jalpesh07</dc:creator><description>&lt;p&gt;I have been writing few post with code refactoring features in Visual Studio 2010. This post also will be part of series and this post will be last of the series. In this post I am going explain two features 1) Encapsulate Field and 2) Extract Interface. Let’s explore both features in details.&lt;/p&gt;  &lt;h3&gt;Encapsulate Field:&lt;/h3&gt;  &lt;p&gt;This is a nice code refactoring feature provides by Visual Studio 2010. With help of this feature we can create properties from the existing private field of the class. Let’s take a simple example of Customer Class. In that I there are two private field called firstName and lastName. Below is the code for the class.&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public class Customer
{
    private string firstName;
    private string lastName;
    public string Address { get; set; }
    public string City { get; set; }
    
}&lt;/pre&gt;

&lt;p&gt;Now lets encapsulate first field firstName with Encapsulate feature. So first select that field and goto refactor menu in Visual Studio 2010 and click on Encapsulate Field. Once you click that a dialog box will appear like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EncapsulateField_5F00_283E12BF.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="EncapsulateField" border="0" alt="EncapsulateField" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/EncapsulateField_5F00_thumb_5F00_70C7DBC3.png" width="504" height="385" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now once you click OK a preview dialog box will open as we have selected preview reference changes. I think its a good options to check that option to preview code that is being changed by IDE itself. Dialog will look like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/PreviewEncapsulateField_5F00_4AC205A0.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="PreviewEncapsulateField" border="0" alt="PreviewEncapsulateField" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/PreviewEncapsulateField_5F00_thumb_5F00_5EAB7269.png" width="504" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you click apply it create a new property called FirstName. Same way I have done for the lastName and now my customer class code look like following. &lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class Customer
{
    private string firstName;

    public string FirstName
    {
        get { return firstName; }
        set { firstName = value; }
    }
    private string lastName;

    public string LastName
    {
        get { return lastName; }
        set { lastName = value; }
    }
    public string Address { get; set; }
    public string City { get; set; }
    
}&lt;/pre&gt;

&lt;p&gt;So you can see that its very easy to create properties with existing fields and you don’t have to change anything there in code it will change all the stuff itself.&lt;/p&gt;

&lt;h3&gt;Extract Interface:&lt;/h3&gt;

&lt;p&gt;When you are writing software prototype and You don’t know the future implementation of that then its a good practice to use interface there. I am going to explain here that How we can extract interface from the existing code without writing a single line of code with the help of code refactoring feature of Visual Studio 2010. For that I have create a Simple Repository class called CustomerRepository with three methods like following. &lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class CustomerRespository
{
   public void Add()
   {
       // Some code to add customer
   }
    
   public void Update()
   {
       //some code to update customer
   }

   public void Delete()
   {
       //some code delete customer
   }
}&lt;/pre&gt;

&lt;p&gt;In above class there are three method Add,Update and Delete where we are going to implement some code for each one. Now I want to create a interface which I can use for my other entities in project. So let’s create a interface from the above class with the help of Visual Studio 2010. So first select class and goto refactor menu and click Extract Interface. It will open up dialog box like following. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ExtactInterface_5F00_5E2F19A7.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="ExtactInterface" border="0" alt="ExtactInterface" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/ExtactInterface_5F00_thumb_5F00_5269ACA8.png" width="504" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here I have selected all the method for interface and Once I click OK then it will create a new file called ICustomerRespository where it has created a interface. Just like following. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SolutionExplorer_5F00_1A8742B8.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SolutionExplorer" border="0" alt="SolutionExplorer" src="http://beyondrelational.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jalpesh/SolutionExplorer_5F00_thumb_5F00_63110BBC.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a code for that interface.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;using System;
namespace CodeRefractoring
{
    interface ICustomerRespository
    {
        void Add();
        void Delete();
        void Update();
    }
}&lt;/pre&gt;

&lt;p&gt;Now let&amp;#39;s see the code for the our class. It will also changed like following to implement the interface.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class CustomerRespository : ICustomerRespository
{
   public void Add()
   {
       // Some code to add customer
   }
    
   public void Update()
   {
       //some code to update customer
   }

   public void Delete()
   {
       //some code delete customer
   }
}&lt;/pre&gt;
Isn&amp;#39;t that great we have created a interface and implemented it without writing a single line of code. Hope you liked it. Stay tuned for more.. Till that Happy Programming. 


&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fbeyondrelational.com%2fblogs%2fjalpesh%2farchive%2f2011%2f06%2f29%2fcode-refactoring-with-visual-studio-2010-part-4.aspx&amp;amp;title=Code+refactoring+with+Visual+Studio+2010+Part-4"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://beyondrelational.com/blogs/jalpesh/archive/2011/06/29/code-refactoring-with-visual-studio-2010-part-4.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description></item></channel></rss>