Edit

Share via


ServiceReference.InlineScript Property

Definition

Gets or sets a value that indicates whether the proxy generation script is included in the page as an inline script block or is obtained by a separate request.

public:
 property bool InlineScript { bool get(); void set(bool value); };
public:
 virtual property bool InlineScript { bool get(); void set(bool value); };
public bool InlineScript { get; set; }
public virtual bool InlineScript { get; set; }
member this.InlineScript : bool with get, set
Public Property InlineScript As Boolean
Public Overridable Property InlineScript As Boolean

Property Value

true if the proxy generation script is included as an inline script block in the page; false if the proxy generation script is obtained by a separate request. The default is false.

Remarks

When the InlineScript property is not declared, the default value is false.

When InlineScript is set to false, the script for generating the ECMAScript (JavaScript) proxies is downloaded as a separate script file by an additional request to the server. If you use browser caching, this option is helpful when multiple Web pages use the same service reference.

When InlineScript is set to true, the proxy generation script is included as an inline script block in the page. This can improve server performance by reducing the number of network requests, especially if there are many service references in the page and other pages do not reference the same services. In addition, the Path property must be set to a relative path when InlineScript is set to true.

Applies to