Using Bookmark in Visual Studio Wednesday, Sep 29 2010 


As the name suggests, bookmarking speedup your code navigation in Visual Studio. There may be some portion of code where we need to move very frequently. Generally we scroll the page and move to that section, but Visual studio provides great features by which we can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.
Below are the set of Icons which are used to navigate the code using Bookmark.


How To Use

We can place the bookmark by clicking on Bookmark icon or using keys Ctrl + K, Ctrl + K. Below is the sample code where I have put two bookmarks in different sections of code.


Now we can easily navigate among those breakpoints using Ctrl + K, Ctrl + N for Next Bookmark and Ctrl + K , Ctrl + p for Previous mark. We can achieve the same using the following toolbar icon.


This is very much easy to use and it gives you very fast navigation throughout the code.

Using Bookmark Window

Visual Studio provides you a Bookmark window where you can get a list of all bookmarked sections.


Now, by selecting a particular bookmark from the Bookmarks list, we can easily move to the particular section.


Renaming BookMarks

For easy reference, we can also rename bookmark so that we can easily identify them. This helps us to easily move to a particular code block based on the name given. This is useful when we are having many bookmarks in the bookmark list.


As I have renamed my bookmark list as below:



This may not be new to many of us, but it may helpful for some beginners. Using this feature, we can navigate our code very easily. Please provide your valuable suggestions and feedback.

Source is taken from:


How to speed up your ASP.NET pages? Wednesday, Sep 29 2010 

You can improve your ASP.NET application performance using:

  • Use Page.IsPostBack
  • Use SQL Server Stored Procedures for Data Access
  • the HttpServerUtility.Transfer method
  • Save View State Only When Necessary.
  • Don’t Rely on Exceptions.
  • Restrict Use of Session State.
  • Limit ASP.NET Server Controls
  • Precompile Your Apps
  • Use ASP.NET Caching

For more information, please refer to: Speed Up Your ASP.NET Pages and Developing High-Performance ASP.NET Applications.

Shortcut keys in .Net Tuesday, Sep 28 2010 

Key What it Does?

Ctrl + N Opens the New Project Dialogue Box
Ctrl + Shift + O Opens the Open File Dialog Box

Ctrl + Shift + A Opens Add New Item window
Ctrl + D Opens Add Existing Item window
Ctrl + S Saves Current Form
Ctrl + Shift + S Saves everything from Application

Alt + Q Exits Visual Studio. NET
Ctrl + Z Undo
Ctrl + Shift + Z Redo
Ctrl + X Cuts your selection
Ctrl + C Copies your selection
Ctrl + V Pastes your selection
Ctrl + A Selects All
Del Deletes your selection
Ctrl + F Opens Find window
Ctrl + H Opens Find and Replace window
Ctrl + Shift + H Opens Replace in Files window
Ctrl + Alt + Shift + F12 Opens Find Symbol window
F7 Opens Code Designer window
Shift + F7 Gets you back to Design View
Ctrl + R Opens the Solution Explorer window
Ctrl + Alt + S Opens the Server Explorer window

Ctrl + Shift + C Opens the Class View window
F4 Opens the Properties window
Ctrl + Shift + E Opens the Resource view window
Ctrl + Alt + X Opens the Toolbar window
Shift + Alt + Enter Takes you to Full Screen View
Alt+F8 Opens Macro Explorer window
F2 Opens Object Browser window

Ctrl + Alt + T Opens Document Outline window
Ctrl + Alt + K Opens Task List window
Ctrl + Alt + A Opens Command window
Ctrl + Alt + O Opens Output window
Ctrl + Alt + Y Opens Find Symbol Results window
Ctrl + Alt + F Lists Items under the Favorites Menu in your Internet Explorer

Ctrl + Shift + B Builds your project
F5 Runs your Application
Ctrl + F5 Runs your Application without Debugging
Ctrl + Alt + E Opens the Exceptions Dialog Box
F8 Used while Debugging Applications
Shift + F8 Used While Debugging Applications
Ctrl + B Inserts a New Breakpoint
Ctrl + Shift + F9 Clears All Breakpoints
Ctrl + Alt + P Opens the Processes Dialog box
Ctrl + T Opens Customize Toolbox window
Ctrl + Shift + P Runs Temporary Macro
Ctrl + Shift + R Records Temporary Macro
Alt + F11 Opens Macros IDE
Ctrl + F1 Opens Dynamic Help window
Ctrl +Alt + F1 Opens Help window sorted by Contents
Ctrl + Alt + F2 Opens Help window sorted by Index
Ctrl + Alt + F3 Opens Help Search window
Shift + Alt + F2 Opens Index Results window
Shift + Alt + F3 Opens Search Results window
Ctrl + E +C Comment out the current selected section

Ctrl + E +U Uncomment the current selected section

How to Freeze GridView Header While Scrolling ? Friday, Sep 24 2010 

How to Freeze GridView Header While Scrolling ?
This is very common problem in Web development that we need to freeze the GridView header at the time of scrolling, Here is one simple tips:
Step 1 : Create a CSS class as following


position:relative ;
z-index: 10;
Step 2 Set Gridview’s HeaderStyle CssClass as follows

That’s all. Some times we need also maintain the scroll positions while selecting any data from GridView, and quite difficult to maintain the position while we are using AJAX, I have written a complete article on that, hope this will help Maintain GridView Scroll Position inside updatepanel


How to Place your reusable code into Toolbox in Visual Studio? Friday, Sep 24 2010 

How to Place your reusable code into Toolbox in Visual Studio?

This is very important and small tips for all VS users. Sometimes we need a small piece of code in many places of our application or in some different application. What we do? We just copy the code from one page and paste it to the destination page.

Visual Studio having a great feature, that you can place your code snippet inside the toolbox. For that you need to just select the code snippet and drag the selected snippet on to the general Tab.


You can rename the selected snippet, by just right clicking on snippet and click on Rename.


Now, you can use it anywhere in your application or in any VS Application by just drag and drop of the selected snippet.

Hope this will help you in future from rewrite of code.


How to select Block of Code in Visual Studio? Friday, Sep 24 2010 

How to select Block of Code in Visual Studio?

You can select line by line code very easily using mouse or keyboard. But if you want to copy some code block where you don’t to select all part of line or something like that, here is a Quick TIP For you. Pressand Hold “Alt” Key, and select the code region.

 With Alt

Using Press ALT Key


Default Selection