ASP.NET
  Home arrow ASP.NET arrow Page 5 - Visual Studio .NET
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Visual Studio .NET
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 24
    2005-03-09

    Table of Contents:
  • Visual Studio .NET
  • Start Page
  • Project Names
  • File Menu
  • Edit Menu
  • Outlining
  • Open and Open With . . .
  • Other Windows
  • Add/Remove Toolbox Items . . .
  • Options…

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Visual Studio .NET - Edit Menu


    (Page 5 of 10 )

    The Edit menu contains the text editing and searching commands that one would expect, but also includes commands useful in editing code. The most useful are:

    Cycle Clipboard Ring (Ctrl+Shift+V)

    The Clipboard Ring is like copy-and-paste on steroids. Copy a number of different selections to the Windows clipboard, using the Edit -> Cut (Ctrl X) or Edit -> Copy (Ctrl+C) commands. Then use Ctrl+Shift+V to cycle through all the selections, allowing you to paste the correct one when it comes around. You can also see the whole clipboard ring in the Toolbox (it’s one of the panes that is visible when you’re editing a text file).

    This submenu item is context-sensitive and is visible only when editing a code window.

    Find and Replace/ Find in Files (Ctrl+Shift+F)

    Find in Files is a very powerful search utility that finds text strings anywhere in a directory or in subdirectories (subfolders). It presents the dialog box shown in Figure 2-8. Checkboxes present several self-explanatory options, including the ability to search using either wildcards or regular expressions.


    Figure 2-8.  Find in Files dialog box

    If you click on the Replace button in the Find in Files dialog box, you will get the Replace in Files dialog box shown in Figure 2-9 and described next.


    Figure 2-9.  Replace in Files dialog box

    Find and Replace/Replace in Files (Ctrl+Shift+H)

    Replace in Files is identical to the Find in Files command, described in the previous section, except that it also allows you to replace the target text string with a replacement text string.


    Regular Expressions

    Regular expressions are a language unto themselves, expressly designed for incredibly powerful and sophisticated searches. A full explanation of regular expressions is beyond the scope of this book. For a complete discussion of regular expressions, see the SDK documentation or Mastering Regular Expressions, Second Edition, by Jeffrey E. F. Friedl (O’Reilly).


    This command is extremely useful for renaming forms, classes, namespaces, projects and so on. Renaming objects is a very common requirement, often because you don’t want to be saddled with the default names assigned by Visual Studio .NET.

    Renaming should not be difficult, but it can be. Object names are spread throughout a project, often hidden in obscure locations such as solution files, project files, and throughout source code files. Although all of these files are text files and so can be searched and edited, it can be a tedious and error-prone task. The Replace in Files command makes it simple, thorough, and reasonably safe.

    Find and Replace/Find Symbol (Alt+F12)

    Clicking on this command will bring up the Find Symbol dialog box shown in Figure 2-10. This allows you to search for symbols (such as namespaces, classes, and interfaces) and their members (such as properties, methods, events, and variables).


    Figure 2-10.  Find Symbol dialog box

    The search results will be displayed in a window labeled Find Symbol Results. From there, you can move to each location in the code by double-clicking on each result.

    Go To…

    This command brings up the Go To Line dialog box, which allows you to enter a line number and immediately go to that line. It is context-sensitive and is visible only when editing a text window.

    Insert File As Text…

    This command allows you to insert the contents of any file into your source code, as though you had typed it in. It is context-sensitive and is visible only when editing a text window.

    A standard file browsing dialog box is presented for searching for the file to be inserted. The default file extension will correspond to the project language, but you can search for any file with any extension.

    Advanced

    The Advanced command is context-sensitive and is visible only when editing a code window. It has many submenu items. These include commands for:

    • Creating or removing tabs in a selection (converting spaces to tabs and vice versa)

    • Forcing selected text to uppercase or lowercase

    • Deleting horizontal white space

    • Viewing white space (making tabs and space characters visible on the screen)

    • Toggling word wrap

    • Commenting and uncommenting blocks of text

    • Increasing and decreasing line indenting

    • Incremental searching (see the next section “Incremental search (Ctrl+I)”)

    Incremental search (Ctrl+I)

    Incremental search allows you to search an editing window by entering the search string character by character. As each character is entered, the cursor moves to the first occurrence of matching text.

    To use incremental search in a window, select the command on the Advanced submenu, or press Ctrl+I. The cursor icon will change to a binocular with an arrow indicating the direction of search. Begin typing the text string to search for.

    The case sensitivity of an incremental search will come from the previous Find, Replace, Find in Files, or Replace in Files search (described earlier).

    The search will proceed downward and left to right from the current location. To search backward, use Ctrl+Shift+I.

    The key combinations listed in Table 2-1 apply to incremental searching.

    Table 2-1. Incremental searching

    Key combination Description
    Esc Stop the search
    Backspace Remove a character from the search text
    Ctrl+Shift+I Change the direction of the search
    Ctrl+I Move to the next occurrence in the file for the current search text
    Bookmarks

    Bookmarks are useful for marking spots in your code and easily navigating from marked spot to marked spot. There are four commands on the Bookmarks submenu (listed in Table 2-2, along with their shortcut key combinations). Note that, unless you add the item to the task list, bookmarks are lost when you close the file, although they are saved when you close the solution (so long as the file was still open).

    Table 2-2. Bookmark commands

    Command Key combination Description

    Toggle Bookmark Ctrl+K, Ctrl+K Place or remove a bookmark at the current line. When a bookmark is set, a blue rectangular icon will appear in the column along the left edge of the code window.

    Next Bookmark Ctrl+K, Ctrl+N Move to the next bookmark.

    Previous Bookmark Ctrl+K, Ctrl+P Move to the previous bookmark.

    Clear Bookmark Ctrl+K, Ctrl+L Clear all the bookmarks.

    Add Task List Shortcut Ctrl+K, Ctrl+H the current line. When a task list entry is set, a curved arrow icon () appears in the column along the left edge of the code window.


    This menu item only appears when a code window is the current window.

    This article is excerpted from Programming ASP.NET by Jesse Liberty and Dan Hurwitz(O'Reilly, 2003; ISBN 0596004877). Check it out at your favorite bookstore today. Buy this book now.

    More ASP.NET Articles
    More By O'Reilly Media


     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek