ClientScriptItem Constructor
Assembly: System.Design (in system.design.dll)
public:
ClientScriptItem (
String^ text,
String^ source,
String^ language,
String^ type,
String^ id
)
public ClientScriptItem ( String text, String source, String language, String type, String id )
public function ClientScriptItem ( text : String, source : String, language : String, type : String, id : String )
Parameters
- text
The contents for the script element; a string of script statements to run on the client.
- source
The src attribute value for the script element, specifying an external source location for the client script contents.
- language
The language attribute value for the script element, specifying the language of the script statements.
- type
The type attribute value for the script element, indicating the MIME type for the associated scripting engine.
- id
The ID for the script element. This argument is required by the design host (for example, Visual Studio 2005).
Initialize the statements for the ClientScriptItem object by using either the text or source parameter (not both). Use text to initialize the script using an input string that contains the statements. Alternately, use source to initialize a script using a path that contains the script statements.
You can specify any of the input parameters as a null reference (Nothing in Visual Basic) or an empty string (""); the corresponding property is set using the input value, and the script element is generated without that property. Using a null reference (Nothing in Visual Basic) or an empty string ("") generates the following results:
-
For text, the corresponding script element does not contain script statements.
-
For source, the src attribute is not set in the script element.
-
For language, the language attribute is not set in the script element.
When a client script block does not specify the script language, the client browser determines the language.
-
For type, the type attribute is not set in the script element.
When a client script block does not specify the script type, the client browser determines the type.
-
For id, the design host (for example, Visual Studio 2005) will throw an ArgumentNullException.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.