Thursday, December 31, 2009

Visual Studio List of Some ShortCut Keys

Use these shortcut keys to save your time while working with Visual Studio.

Finds the next occurrence of the previous search text.
Start debugging
Jump to code behind file from .aspx files
Moves the cursor to the next item, such as a task in the Task List window or a search match in the Find Results window. Each time you press F8, you move to the next item in the list.
Toggle breakpoint
Go to definition of identifier under cursor
Start without debugging
Jump to the Navigation Bar (hit TAB to get to the right side)
Find word under cursor
Toggle between windows in Visual Studio
Incremental search (this is way better than Ctrl+F)
Force IntelliSense for field members
Ctrl+C (with nothing selected)
Copy whole line
Open line above line cursor is on
Ctrl-X or Ctrl-L (with nothing selected)
Cut whole line
Bounce cursor between matching parentheses/brackets/braces
Toggle between Design and Source views in .aspx files
Alt+W, L
Close all windows
Ctrl+K, Ctrl+C
Comment out selection
Ctrl+K, Ctrl+U
Uncomment selection
Ctrl+K, Ctrl+D
Format document
Ctrl+K, Ctrl+X
Insert snippet (or just type in the snippet name and hit TAB, TAB)
Ctrl+K, Ctrl+S
Surround selected lines with snippet
Ctrl+K, Ctrl+K
Toggle bookmark on/off
Ctrl+K, Ctrl+P
Jump to previous bookmark
Ctrl+K, Ctrl+N
Jump to next bookmark
Ctrl+M, Ctrl+M
Open/close current fold
Ctrl+M, Ctrl+O
Fold all methods
Ctrl+R, Ctrl+R
Enables or disables word wrap in an editor.
Build solution
Displays the Class View window
Open line below line cursor is on
Global Search
Delete all breakpoints
Displays the Command window, which allows you to type commands that manipulate the IDE.
Displays the Immediate window, where you can evaluate expressions and execute individual commands.
Displays the Task List window where you customize, categorize and manage tasks, comments, shortcuts, warnings and error messages.
Open the Solution Explorer (to find your file after you just closed them all)
View Document Outline
Displays the Output window to view status messages at run time
Open browser within VS.NET
Displays the Modules window, which allows you to view the .dll or .exe files used by the program. In multiprocess debugging, you can right-click and select Show Modules for all Programs.
Open Toolbox
View editor in full screen mode

Monday, November 30, 2009

Introduction to Jquery


JQuery is a Java script libarary/ Java Script framework that simplifies the interaction process or access process of traversing in HTML document. It provides methods to make animations, add ajax interaction to the page, provides an easy way to apply CSS to any items and provides an easy mechanism for binding and unbinding events. Huge code written using Java script can easily replaced by few lines of code in JQuery.

History of JQuery

Initially it’s was released in January 2006 but the very first stable version of JQuery 1.0 was released in August 2006. This version had support for CSS, events and Ajax. After that many version of JQuery were released but the latest version is JQuery 1.3.2. You can download this from JQuery website.

What can be done using JQuery

1. Allows to access elements in the document

If one need to access the DOM tree without any JavaScript libarary, one has to write many lines of code. JQuery provides a selector mechanism to access any part of DOM.

2. Easily apply CSS

As it’s known that CSS is the most powerful and mostly used for good appreance of any webpage. JQuery provides CSS Selectors which allows to change the CSS classes or individual style for any portion of the document. This can be done even after the page is rendered.

3. Make Animation

For better user experience, animation can do the job for you. JQuery provides many methods to perform animations like show,hide, fade, wipe, start, stop etc. Doing all this with JQuery is fun as No huge lines of code, no complex logic.

4. Ajax Interaction

In today’s world, Ajax is one of the most popular technology used in almost every website for better user experience. Jquery provides support for ajax also which allows to access server side event without refreshing the web page.

5. API to change document’s content

JQuery provides API (Application Program Interface) which allows to change the content of the document. Changing Text, inserting images, ordering of list can be done with few keystrokes with JQuery API. Entire structure of HTML can be rewritten or extended.

6. Event handling

Any technology is a failure if it cannot responsed to the user when any event takes place. Jquerys’s event handling is one the decent feature. It quickly responsed to any event such as user clicking a button.


To start with JQuery, first download the Jquery from it’s official website ( Make sure you download the latest copy of the JQuery.

1<script src="Script/jquery.js" type="text/javascript"></script>

I have copied the jquery.js and placed it in script directory of the project. In this demo, I am going to show you how easily you can change the CSS and do animation.

Let’s first take a look at HTML

2History of JQuery</h2>
3<div id="content">
4Initially it's was released in January 2006 but the very first stable version of JQuery 1.0 was released in August 2006. This version had support for CSS,events and Ajax. After that many version of JQuery were released but the latest version is JQuery 1.3.2. You can download this from JQuery website.

As you can see, I have placed a div tag with it’s ID set to content. Now, I will show you how you can find the div and apply CSS to it using JQuery.

01<style type="text/css">
02    .ApplyColor
03        {
04            background-color: Gray;
05            font-family: Arial;
06            font-size: 10pt;
07            color: White;
08        }
09    h2
10        {
11            font-size: 20pt;
12        }
15<script type="text/javascript" language="javascript">
17    $(document).ready(function() {
18        $('#content').addClass('ApplyColor');
19    });

.ready() is a jQuery event handler. This particular event handler will execute when the document is ready to be accessed and scripts have completed loading. A .ready() handler can be placed anywhere on the page and you can even have multiple ready handlers in the page.

Now, if you run this page, you will see the div with content id is having gray background and white color foreground.

Let’s go to the animation part with JQuery.

Place a button and some text in Paragraph tag. Using JQuery, I will add a click event handler.

1<asp:Button ID="btnShow" runat="server" Text="Show" />
2<p style="display: none;background-color:Red">
3    Hello

Now add this Jquery code to document.ready event

01<script type="text/javascript" language="javascript">
03    $(document).ready(function() {
04        $('#btnShow').click(function() {
05              $("p").show("");
06              return false;
07        });
08    });

Above code will find the btnshow and add a click event handler to it. When the button is click then Jquery will find the p tag and make a call to show function which will display the content of the p tag on the screen.

Like wise there are many more functions for animation. You can find the whole list over here.



This is just an overview of starting with Jquery. Many more complex things can be done via jquery with ease. Go to this main page of Jqueryand learn as much as you can.

Happy Programming…

Virendra Dugar :)

Blogged with the Flock Browser
back to top