This documentation is archived and is not being maintained.

Create URL Dialog Box

Visual Studio .NET 2003

This dialog box helps you to construct a path to an existing file on disk. Such HTML elements as <A> links, <IMG>, and <FRAME> use universal resource locator (URL) path strings to identify the files they call.

Tip   Create references to files that are already included in your project. This helps ensure that the file called will be deployed to the Web server together with the Web page that calls it. For more information, see Adding New Project Items.

The title of this dialog box sometimes varies, reflecting the selected element and the type of file sought.

Opening the Create URL dialog box

The Create URL dialog box can be accessed while configuring various HTML elements. These include:

  • Hyperlinks

    Select the desired text or image for the link on the Design view surface. On the Format menu, choose Convert to Hyperlink to open the Hyperlink Dialog Box, and then select the Browse button.

    - or -

    Select an existing hyperlink in the Document Outline Window. On the View menu, choose Property Pages to open the <A> Property Pages Dialog Box, then select the ellipsis (...) button beside the Link field. Or, in the Properties window, choose the href property of the selected <A> element, and click the ellipsis (...) button that appears.

  • Images

    Select an existing image on the Design view surface. On the Format menu, choose Build Style to open the Style Builder Dialog Box. Choose Background in the left-hand pane, then click the ellipsis (...) button adjacent to the Image field.

    - or -

    Drag an Image from the HTML Tab, Toolbox onto the Design view surface. On the View menu, choose Property Pages to open the <IMG> Property Pages Dialog Box, then select the ellipsis (...) button beside the Image Source field. Or, in the Properties window, choose the src property of the selected <IMG> element, and click the ellipsis (...) button that appears.

  • Frames

    Open an HTML Frameset for editing in Design view, and select a frame. On the Frames menu, choose Set Page for Frame. Or, in the Properties window, choose the src property of the selected <FRAME> element, and click the ellipsis (...) button that appears.

Using the Create URL dialog box

Select an element on the Design view surface or in the Document Outline window, then open the Create URL dialog box and select the desired project file.

When you select a file, a URL string that includes its full file path and name is automatically constructed. You can then edit this URL string as needed (for example, to create a relative file path), and then insert it into the selected HTML element by selecting OK or Apply.

The Create URL dialog box provides the following fields:

Projects
Displays the projects in the active solution.
Contents
Displays the files available in the project selected in the Projects field.
Note   If you are editing a file included within a project, the Create URL dialog box opens by default to the current project folder.
Files of type
Filters the files in the Contents field, so that only certain file types are displayed.
URL type
Choose the type of file path to include in the URL string:
  • Absolute — include the full path to the target file, for example

    http://localhost/CShProject/GoThere.htm

  • Document Relative — include a relative path that expresses the location of the desired file in relation to the location of the current document, for example,

    ../Img/MyHouse.gif

  • Root Relative — include a relative path based upon the parent directory of the current document, for example,

    /CShProject/GoThere.htm

URL
Displays an editable URL string. The URL value is derived automatically from your choices in the previous fields. You can revise this string as needed, for example to change the protocol or revise the path or filename.

If the URL for the background image contains a search component to be passed to a server, you can enter the query string in this field. Separate the query from the rest of the URL with a question mark ("?"), to create a string of the following form:

http://ourServer/myFolder/myPage.htm?getsomething%20value

URL preview
Displays the resulting URL.
Browse
Opens a Look In dialog box to search other locations for the desired file.

The Look In dialog box provides the following fields:

Look in
Select the directory that contains the desired document. The contents of this directory are displayed below. Select the desired document and choose Open.
File name
Leave this field blank to see all available files. Enter a specific file name to display only that file. You can also use wildcards to search for file names that share a certain string (for example, test* displays TestAttrib.doc and TestFrameset.htm).
Files of type
Select All Files to display the full contents of the selected directory, or select Web Documents to display only Web-related files.
Open
Closes the Look in dialog box. The path to the selected file is automatically entered in the URL field of the Create URL dialog box.

See Also

Inserting HTML Hyperlinks and Bookmarks in Design View | Hyperlink Dialog Box | HTML Tab, Toolbox | HTML Document Properties, Properties Window | <IMG> Property Pages Dialog Box | Assigning HTML Pages to Frames in a Frameset | <A> Property Pages Dialog Box | HREF Attribute | href Property | SRC Attribute | src Property | Document Outline Window | Editing HTML Pages in Design View

Show: