System.Design
2.0.0.0
System.Object
The class represents a script element that is contained in a Web document at design time. A custom control designer implementation can use a object to add client script elements to a Web Form or user control.
At design time, use the class to set or examine client script elements that are contained in a document, such as a Web form, a Web server control, a content page, or a master page, on the design surface. Retrieve the collection of client script elements that are contained within the Web document by using the method. Add a client script element to the Web document by using the method.
Typically, a script element either contains script statements or specifies an external location for script statements. The script element can optionally define the language of the script statements. Use the constructor to initialize the properties for a new script object. Use the properties to examine the script object attributes and contents. The property represents the language attribute of the script element. The property represents the src attribute. The property represents the script statements to be executed on the client that are contained in the script element.
Use the class to manage scripts that are to be executed at design-time.
To manage client script elements at run time, use the class. For more information about using client scripts at run time, see Client Script in ASP.NET Web Pages.
The class represents script elements at design time that are ultimately parsed and run in the client browser. Because the script elements that are generated for the objects are not run on the server, the elements do not contain the runat="server" attribute.
Represents a client script element in a Web Form or user control at design time. This class cannot be inherited.
Constructor
2.0.0.0
Initialize the statements for the object by using either the or parameter (not both). Use to initialize the script using an input string that contains the statements. Alternately, use to initialize a script using a path that contains the script statements.
You can specify any of the input parameters as null or an empty string (""); the corresponding property is set using the input value, and the script element is generated without that property. Using null or an empty string ("") generates the following results:
-
For , the corresponding script element does not contain script statements.
-
For , the src attribute is not set in the script element.
-
For , 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 , 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 , the design host (for example, vsprvslong) will throw an .
Initializes a new instance of the class using the provided parameters.
The contents for the script element; a string of script statements to run on the client.
The src attribute value for the script element, specifying an external source location for the client script contents.
The language attribute value for the script element, specifying the language of the script statements.
The type attribute value for the script element, indicating the MIME type for the associated scripting engine.
The ID for the script element. This argument is required by the design host (for example, vsprvslong).
Property
2.0.0.0
System.String
To be added.
To be added.
Gets the ID attribute value for the client script element.
Property
2.0.0.0
System.String
To be added.
The property represents the language in which the script statements are written. If the property is null or an empty string (""), 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.
The property is initialized by the constructor.
Gets the language attribute value for the client script element.
Property
2.0.0.0
System.String
To be added.
The property specifies an external source location for the client script contents. Typically, the script statements for a script element are specified using either the or property.
If the property is null or an empty string (""), the src attribute is not set in the script element.
The property is initialized by the .
Gets the src attribute value for the client script element.
Property
2.0.0.0
System.String
To be added.
The property represents the statements that are contained in the script element. Typically, the script statements for a script element are specified using either the or property.
If the property is null or an empty string (""), the script element does not contain any script statements.
The property is initialized by the constructor.
Gets the script statements contained in the client script element.
Property
2.0.0.0
System.String
To be added.
To be added.
Gets the type attribute value for the client script element.