Quickly locate elements in VS with tag navigation

Source: Internet
Author: User

A complex project is often composed of hundreds of elements. How to quickly locate elements is very important for developers. To do this, it is not difficult indeed. In VS, this can be done through the HTML tag navigator. The main problem now is a habit and experience problem for developers. Although I can not say that the experts in this field, but also quite have experience. Here to share with you.

One, the most common two kinds of element localization.

In VS project Development, there are two kinds of more special and frequently used elements. One is a parent-child element, such as TD and TABLE,TD are child elements, and table is the parent element. With the tag navigator for VS, you can quickly move from the current element (child element) to the element that is in the higher position (the parent element) in the current hierarchy. This feature is very useful in the use of embedded structures that are deeply nested. The second is the focus element. Sometimes, for some reason, developers set some elements as "focus elements." If it might be for testing purposes or for some element to be questioned. Using the tag navigator, you can quickly determine the focus element in your document.

Obviously the tag navigator is quite helpful in the actual project. The following author will give you the reader to introduce the specific use of this tag navigator skills.

How do i show the current path?

A very important feature of Web applications is that their project managers, like the Windows operating system's "explorer", integrate individual code files into a single system through paths. If an error occurs on a path, the application may compile without compiling an error because the source file was not found. It is no exaggeration to say that path management has a critical impact on the success or failure of Web projects.

In project development, the most common action for developers is to view the current path. The tag navigator can help developers to implement this requirement. By default, the tag navigator appears at the bottom of the Web page Editor. One of the things in the tag navigator is called the navigation path. This content is the path from the currently selected tag to the outermost available tag. Notice here what is called the "outermost available tag"? In different cases, the available tag is different. As in the source view, the outermost available tag is the HTML tag, whereas in Design view the outermost tag is the body tag. This difference developer must be clear. Many beginners in this place will carry a somersault, have "blood lesson."

How to select elements through the tag navigator?

Displaying the current path or displaying the focus elements is not the ultimate goal of our developers. Developers want to be able to navigate quickly to the desired elements while displaying the elements. Simply put, you can go to that element by clicking the tag in the navigator. Instead of saying that you have to find it by your path.

Similar functionality is provided in the VS tag navigator. Developers can click a tag in the navigator to select the element that it represents. It also has a good nesting function. If the selected tag has the next level of content, the tag in the navigator also displays a Drop-down list for developers to choose from. The Drop-down list allows developers to select the entire element or select only one of the following. Give a simple example. If you have a "TD" tag in the navigator now. Under this tag there are two contents, namely "TD element" and "TD element content". Sometimes the developer may want to see not the element itself, but rather change the attributes of the element, at which point you can use the Drop-down list on the tag navigator to select TD elements.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.