Most of all are well aware about command line profiling for ASP.NET Application using VSPerfASPNETCmd command line tool . This can easily profile your ASP.NET Web applications which is hosted on IIS. We just need to run VSPerfASPNETCmd command with required parameter. Once profiling done, we can inspect the generated performance report (.vsp) file within Visual Studio. But, do you know we can do the complete profiling within Visual Studio itself. How ? Here you go.
Visual Studio 2010 introduced a nice new “DataTip pinning” features that enable you to better track of variable and expression while debugging. I am sure by this time you must be knowing what is “Data Tips” and different features of it. In In this Post I am going to share a small tip which talks about tracking some out of scope object using DataTips while debugging.
IntelliTrace debugging is only available with Visual Studio 2010 Ultimate Edition, which collects debugging information in background and can be used at any point to time to analysis previous debugging data. IntelliTrace collected debugger information into a trace log file (.iTrace ) that can then be opened and debugged using Visual Studio later. Size of .iTrace was always a concerns, as it’s take huge amount of your hard drive space and IntelliTrace is on by default. So whenever you are doing F5 debugging in Visual studio .iTrace is getting saved and it’s consuming your hard drive.
Well, before moving forward, I must thank to Larry Guger , Program Manager for IntelliTrace features . Yesterday I had a discussion with him on IntelliTrace . During discussion I found there are several changes on IntelliTrace log saving which has been shifted with Visual Studio 2010 SP1. I have already blogged about few of them over here http://bit.ly/f8awhz. But few hidden stuff was missing which I got to know from Larry only. In this post I am going to discussed about those changes.
If you have deal with Visual Studio Extension ( VSIX) , you must have seen, after the extension installation default icons are predefined ( As shown in below image ). In this post I am going to describe how you can customize /change the default visual studio extension icon and can provide your own icon over there.
In the recent update of Visual Studio 2010 productivity power tool there are few new interesting features introduced. You can download the Productivity tool from http://bit.ly/9nybU6 . There are certain new features like Quick Find which allows you find and advance find dialog option with in code editor with nice highlighting features, nice enhancement of add reference window. kunal chowdhury has some nice blog post where he talked about above two new productivity tool features. You can find the post over http://bit.ly/hDa0si and http://bit.ly/grhGAI . In this post I am going to talk about another nice and most interesting features of Power Productivity Tool which “Enhanced Scroll Mode”.
I have been asked this question many times and also found many people have some confusion around different supported version of .NET framework by IntelliTrace debugging. As IntelliTrace is new features of Visual Studio 2010 Ultimate edition and VS 2010 came up with .NET 4.0, so many may got confused that IntelliTrace only support debugging of .NET 4.0 features. But NO. IntelliTrace is available for .NET Framework 2.0 , 3.0, 3.5 and 4.0 . So, if you are creating any application (like Window, Console, ASP.NET) with any framework from Visual studio 2010 you can use IntelliTrace Debugging. Even if, you have an earlier application which is based on .NET 3.5 or lesser and you are running it from VS 2010 Ultimate edition, you can enjoy the IntelliTrace features. For an ASP.NET Application based on the targeted Framework version .iTrace log will be different. Generally for ASP.NET Application IntelliTrace log file name start with the name of the process which is handling the current request.
While creating a Silverlight application in Visual Studio 2010, after providing the application name, IDE asked for whether you want to host the Silverlight application in a new ASP.NET web site or not. If you select the “Ok” button , Visual Studio will create a ASP.NET Site to host the corresponding Silverlight Application. So whenever you will run the Silverlight application, ASP.NET site will automatically host the Silverlight file But suppose you have an existing Silverlight Application and you want to host it in a ASP.NET site in a similar way that New Silverlight project does or you want to add a new Silverlight application which will automatically host inside your current asp.net web site? Do you know we can easily achieve this using “Property Pages” of an ASP.NET Application. Let’s explore how we can do that.
“Track Change” one of the best interesting features in visual studio which indicates the code changes with a color indicator at the beginning of the line. Generally we know about the two color indicator “Green” and “Yellow” which are used indicting the color change till VS 2008 along with those VS 2010 introduced another new color “Orange” which indicates some additional track change for undoing file after save. In this blog post I am going to explain how those color indicator helps developers to track the code changes.
In Visual Studio 2010, there is three color indicator
Green color indicates the lines which you have edited before your last save. Save again the file and green mark will be disappear.
Yellow color indicates the lines which you have edited since the last save of that file. Yellow becomes Green after saving of the file. Once you close the file that indication disappears.
This color indication has newly introduced in VS 2010. This color will come when user does an undo after a save operation for that current file. Orange color indicates that current changed line is different from the saved version of the file.
“Dirty Indicator” is nothing but the indication of “Modified Unsaved” file in Visual Studio IDE. In Visual Studio 2010, by default dirty icon shows as “*”. Using productivity tool we can customize this icon.
To launch the VS 2010 productivity Tool, from Visual Studio IDE Go To Tools > Option > Productivity Power Tool
You will find the Dirty Indicator under Document Tab Well > General Settings . Dirty Indicator having 4 different value, by default sets to “Default” which means it will indicate unsaved modified file as “*” .
Visual Studio 2010 Productivity power tools introduced many new features for VS developer. Here I am going to talk about one small but useful features of the productivity tool. You can use “Shift + Enter” to add semicolon (;) to end of the line. Instead of putting “;” end of the line, you just press “Shift+Enter”. It will automatically add “;” at the end of the line and will move the cursor to next line.
As shown in the picture. If you press “Shift+Enter” over there, power tool will automatically add “;” and the end and the cursor will be moved to next line.
Solution Navigator is a new window that has been introduced with in this power tool which is an enhanced Solution Explorer. This window having many features like search code, highlight code, code navigation, File open, save, edit status etc. Along with these features one of the interesting features that I liked is “View this as root”. This features is very much helpful when you have the many projects with in a solution or your solution hierarchy is large. To start “Solution Navigator” , go to View > Solution Navigator or use (Ctrl + W, F) as shortcut key.This will open the “Solution Navigator” window.
Look and feel wise it is same as “Solution Explorer” but functionally it is quite different. You will find a “icon” at the right to side with all the files/folder under that solution as shown in below picture.
CodeProject It is very much easier to apply CSS when we have ul,li elements as the HTML content. If we look into ASP.NET Menu Control till Version 3.5, its render as Table-TR-TD Tag. Though Table/Tr/Td is quite useful to display tabular data but sometime creates a big problem when we need to do more work with CSS. To overcome this problem we generally used CSS Friendly adapterto render the ASP.NET Control inul/li mode.
ASP.NET 4.0 makes the things easier for web developer by providing “RenderingMode” properties. Here we can specify RenderMode of a ASP.NET Menu control. Which define the what will be the HTML Render Content Type. Bydefault mode is “List” which means control will be render as ul/li.
As per the above diagram we can see that there are three mode available. We can use any one of them as per the requirement.
CodeProject
View State is one of the most important and useful client side state management mechanisms. It can store the page value at the time of post back (Sending and Receiving information from Server) of your page. ASP.NET pages provide the View State property as a built-in structure for automatically storing values between multiple requests for the same page.
we generally used “EnableViewState” Properties for both Page Level and Server Control Level to maintain the view state. Till ASP.NET 3.5 Version, Page Level view state control treat as highest priorities. Which means If we set EnableViewState= “False” in page level that will automatically derived by all the server side control. In that case if we set “EnableViewState=”True”” for any server side control will treat as false, as we have defined them “False” in Page Level.Here is one complete article on ASP.NET 2.0/3.5 View State , which may helpful for you
Now, let’s have a look into the changes in ViewState Control in ASP.NET 4.0. There is a massive change in View State Control in ASP.NET 4.0 which is very much helpful for developer also. Asp.net 4.0 added a new property to Page object and server controls called ViewStateMode.