Share via


Setting the defaultClientScript Property of an HTML Document

The defaultClientScript property of an HTML document sets the default scripting language used by its client-side <SCRIPT> elements.

Setting the defaultClientScript property in Visual Studio .NET inserts a <META NAME="vs_defaultClientScript"> element into the <HEAD> portion of the active HTML document:

<META NAME="vs_defaultClientScript" content="JavaScript">.

For more information, see defaultClientScript Property.

You can set the defaultClientScript property either in the HTML Document Properties, Properties Window or in the General Tab, DOCUMENT Property Pages Dialog Box.

To set the defaultClientScript property in the Properties window

  1. Open an HTML document for editing in Design view.

  2. At the top of the Properties window, choose DOCUMENT properties.

  3. Select the targetSchema property, and choose a Web browser from its drop-down list that supports HTML 4.0 and later.

    The defaultClientScript property becomes available.

  4. Select the defaultClientScript property, and choose a value from its drop-down list.

To set the defaultClientScript property in the DOCUMENT Property Pages dialog box

  1. Open an HTML document for editing in Design View.

  2. At the top of the Properties window, choose DOCUMENT properties.

  3. On the View menu, select Property Pages.

    The DOCUMENT Property Pages dialog box opens.

  4. Select the General tab

  5. Choose a Web browser that supports HTML 4.0 or later from the Target Schema drop-down list.

    The Default Scripting Language setting becomes available.

  6. Select a value from the Client drop-down list under Default Scripting Language.

See Also

Setting the targetSchema Property of an HTML Document | Properties Window | Creating Scripts and Editing Event Handlers in HTML Designer | HTML Tab, Toolbox | Web Forms Tab, Toolbox