Share via


Visual InterDev

      

In addition to typing HTML text, you can add a variety of components to your page, including:

  • Controls and objects

  • References to other files, including images, links, and style sheets

  • Database connections

  • HTML text

In general, you can add components to your page by dragging them from either the Toolbox or the Project Explorer.

Adding Controls and Objects

When you are working in Microsoft® Visual InterDev™, the Toolbox lists controls that you can use on your page. These include:

  • Visual InterDev design-time controls   User interface controls such as text boxes and buttons that allow you to use standard object-oriented techniques for creating and scripting Web pages.

  • ActiveX controls   Controls that are registered on your computer.

  • HTML controls   Standard HTML controls such as text areas and buttons.

  • Server components   A list of the components and objects supported on Microsoft® Internet Information Server (IIS) that you can use in server script. These include ActiveX® Data Objects (ADO), Index Server objects, and more.

To use any of these components, drag them from the Toolbox onto your page at the location you want them to appear. Most controls and objects are displayed graphically in the HTML editor in both Design view and Source view. In Source view, you can specify that you want to see the text version of an object.

****Note   ****You can customize the Toolbox by adding new elements and tabs. For details, see .

Adding References to Files

When you add images, links, documents, and style sheets to your page, you don't actually embed the element in your page. Instead, you add a reference to that element. For example, when you add an image, you are adding an HTML <IMG> tag that includes the name of the .gif file containing the image.

You can add a referenced element to your page by dragging it from the Project Explorer. You can do this with:

  • Images   If you drag an image from the Project Explorer to the page (for example, from the images node), the HTML editor creates an <IMG> tag.

  • Web pages   By dragging an .htm or .asp file onto the page, you automatically create a hyperlink to that document.

  • Documents   You can drag a text file or word processing document from the Project Explorer onto the page to create a link that allows users to download the document.

  • **Style sheets   **If you drag a style sheet (.css file) from the Project Explorer into the header of the document, you automatically create a link to that style sheet.

You can drag elements onto the page from any drag source, including Windows® Explorer. When you do, the URL of the element is made relative to your project root.

****Note   ****You might need to fix the URL of the link in Source view to be correct for your deployed project.

Adding Database Connectivity

If your Web pages interact with a database, you can easily create data commands in your Web project and data-bound controls on a page. Using drag and drop, you can:

  • Add a data connection to your Web project. A data connection contains information required to connect to a specific database in a specific location.

  • Add a data command to an existing data connection. A data command is a pointer to a database object — a table or view, stored procedure, database diagram, or query.

  • Create data-bound controls on the page.

For more information about data connectivity, see Database Basics and Data Access Architecture. For details about using data-bound controls, see Getting Records and Displaying Data on Your Web Page.

Storing and Reusing HTML Text

If you want to reuse any element in your page — HTML text, a control, a script, a link, or any other element that you can select — you can store it on the Toolbox. Select the text, and then drag it to the Toolbox. When you drop it, the Toolbox creates a new element called HTML Fragment. You can then drag the element from the Toolbox to any other page.

If you want to store multiple elements this way, you can give them meaningful names and even create a special tab in the Toolbox for them. For details, see .