What Is an ASP.NET Tag?

HTML tags make the Internet as you know it possible. All pages that Web surfers see on the Internet contain tags. These tags produce everything from menus to images on Web pages. ASP.NET generates HTML tags. However, when ASP.NET developers code their Web pages, they see something entirely different. When Microsoft invented ASP.NET, they gave the development language its own set of unique tags that duplicate and augment existing HTML tag functionality.

  1. HTML Tags

    • Visit a Web page that contains a table, click your browser's "View Source" button and you will see a tag that creates that table. Tables, images, text boxes, navigation menus and even video players exist only within the confines of an HTML tag block. A tag block often consists of a beginning tag, such as "<table>," and an ending tag that completes the block. The ending tag for a table is "<\table>." The text that developers place between the two tags generates the HTML element that you see in your browser. Other common tags include "<p>" and "<h1>." Those tags create paragraphs and headings.

    ASP.NET Tags

    • ASP.NET tags generate the same types of controls that HTML tags produce. ASP.NET tags, however, tell browsers to generate Web page elements on the Web server instead of asking browsers to create these elements. When an ASP.NET Web server receives a request to create a text box, the Web server builds an HTML tag block that generates a text box and sends that code back to a user's browser which then displays it. That is why developers refer to ASP.NET elements such as text boxes as server controls.

    Functionality

    • Imagine moving a chess piece in an online chess game and waiting for a response from the computer that never comes. In order for your browser to play chess with you, it must execute some kind of programming code. Web pages that use regular HTML tags to generate controls rely on scripting languages such as JavaScript to handle programming logic. This code runs locally inside a user's browser. ASP.NET, which relies on server tags to create controls, sends your request to a remote server which processes your request. The server then sends a response back to the browser which refreshes your Web page with new information.

    ASP.NET Tag Benefits

    • ASP.NET server tags help developers build complex websites quickly using Microsoft Visual Studio. To create an ASP.NET tag block automatically, simply drag a control such as a list box onto a Web form during the design phase. The Visual Studio editor will generate the required ASP.NET tags and the code that goes between them. Successful ASP.NET developers exist who know little about how HTML works. They let Visual Studio create the ASP.NET tags while they write the more complicated programing logic that manages the controls the tags create. ASP.NET tags also make it possible for developers to create reusable components called user controls that they can share with others.

Related Searches:

References

Resources

Comments

Related Ads

Featured