Export (0) Print
Expand All

Use IntelliSense

You can use IntelliSense to streamline the process of authoring HTML, cascading style sheets (CSS), ASP.NET, XSLT, and script when you work directly in the source code of these items. IntelliSense automatically inserts code as you edit, including end tags, closing braces, and quotation marks around values. For example, if you type a start tag, such as <p>, the end tag, in this example </p>, is automatically inserted for you.

IntelliSense also enables you to look up and insert code that's compatible at the current point in your code. The DocType declaration in a page determines the options that appear in the IntelliSense shortcut menus. For more information, see Set document type information. In addition, the option you set for the CSS Schema in the Page Editor Options determines the level of CSS that appears in IntelliSense shortcut menus. For more information, see Set IntelliSense options for CSS.

You can also use IntelliSense to go to the code that contains a class-based style's rule set or a script function, or to open an external cascading style sheet (CSS) that's attached to the page. For more information, see Go to a hyperlink or bookmark (HTML anchor).

In order for the IntelliSense shortcut menus to appear, the various statement completion options that appear in the IntelliSense tab of the Page Editor Options dialog box must be selected.

Cc295011.alert_tip(en-us,Expression.10).gifTip:

If an IntelliSense shortcut menu or ScreenTip doesn't appear, your cursor may not be in a valid location in the code for inserting an element, class, ID, property, or value, and the code that precedes the cursor may not be valid.

Cc295011.alert_note(en-us,Expression.10).gifNote:

Many features and commands that you can use in the Code view of a page have keyboard shortcuts. For more information, see Code view shortcuts in Keyboard shortcuts.

To select IntelliSense completion options

  1. On the Tools menu, click Page Editor Options.

  2. In the Page Editor Options dialog box, under Auto Popup on the IntelliSense tab, make sure the following options are selected:

    • HTML statement completion

    • CSS statement completion

    • ASP.NET statement completion

    • Scripting statement completion

To display a shortcut menu of tags that are valid at the current point

  • Either type < or put your cursor between two empty angle brackets (<>) or after an empty start angle bracket (<) and do one of the following:

    • On the Code View toolbar, click the List Members button Cc295011.f0d23c77-8315-49f6-a8b4-9b928c1f5820(en-us,Expression.10).gif.

    • On the Edit menu, point to IntelliSense, and then click List Members.

To display a shortcut menu of tag properties that are valid at the current point

  • Put your cursor in a start tag, anywhere after the HTML element in that tag, and do one of the following:

    • Press SPACEBAR.

    • On the Code View toolbar, click the List Members button Cc295011.f0d23c77-8315-49f6-a8b4-9b928c1f5820(en-us,Expression.10).gif.

    • On the Edit menu, point to IntelliSense, and then click List Members.

To display a ScreenTip that lists script parameters that are valid at the current point in a script

  • Do one of the following:

    • On the Code View toolbar, click the Parameter Info button Cc295011.31f64f0a-90dc-48ad-97ab-adda3d377d58(en-us,Expression.10).gif.

    • On the Edit menu, point to IntelliSense, and then click Parameter Info.

To display a shortcut menu that lists script components that are valid at the current point in a script

  • Do one of the following:

    • On the Code View toolbar, click the List Members button Cc295011.f0d23c77-8315-49f6-a8b4-9b928c1f5820(en-us,Expression.10).gif.

    • On the Edit menu, point to IntelliSense, and then click List Members.

To locate the item you want to insert into your code

  • In the IntelliSense shortcut menu, do any of the following:

    • To move through the shortcut menu one item at a time, press the DOWN ARROW key or the UP ARROW key.

    • To move through the shortcut menu one block of visible items at a time, press PAGE DOWN or PAGE UP.

    • To move directly to a particular part of the shortcut menu, type the first letter of the item you want to go to in the list.

    • To scroll through the list, click the arrows on the vertical scrollbar.

To insert a selected item from a shortcut menu into your code

  • Do one of the following:

    • Press either TAB or ENTER.

    • Double-click the item.

    • On the Code View toolbar, click the Complete Word button.

    • On the Edit menu, point to IntelliSense, and then click Complete Word.

To close the list without inserting any of the shortcut menu items

  • Press ESC or click outside of the shortcut menu.

Community Additions

ADD
Show:
© 2014 Microsoft