Editar

Compartilhar via


ScriptManager.ScriptPath Property

Definition

Caution

This property is obsolete. Set the Path property on each individual ScriptReference instead.

Gets or sets the root path of the location that is used to build the paths to ASP.NET Ajax and custom script files.

public:
 property System::String ^ ScriptPath { System::String ^ get(); void set(System::String ^ value); };
public string ScriptPath { get; set; }
[System.Obsolete("This property is obsolete. Set the Path property on each individual ScriptReference instead.")]
public string ScriptPath { get; set; }
member this.ScriptPath : string with get, set
[<System.Obsolete("This property is obsolete. Set the Path property on each individual ScriptReference instead.")>]
member this.ScriptPath : string with get, set
Public Property ScriptPath As String

Property Value

The location where script files are stored. The default value is an empty string (""), which is interpreted as a relative path.

Attributes

Remarks

The ScriptPath property enables you to specify an absolute, relative, or application-relative URL for all script blocks on the page. This includes custom and third-party script blocks that are registered with the current ScriptManager instance. The ScriptPath property is typically set declaratively as an attribute of a ScriptManager element on the page, but it can be set in code also.

If the path attribute or the Path property is set for a ScriptReference object in the Scripts collection, the path value overrides the ScriptPath value for that ScriptReference instance.

If no Path value is specified, the ScriptManager control searches the directory that is defined by the ScriptPath property and resolves script references by their Name or Assembly properties.

Applies to