Substitution Constructor
Collapse the table of content
Expand the table of content

Substitution Constructor ()

 

Initializes a new instance of the Substitution class.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
Substitution()

Use the Substitution constructor to create and initialize a new instance of the Substitution class.

The following code example demonstrates how to add a Substitution control programmatically to an output-cached Web page. When the page loads, the current date and time are displayed to the user in a label. This section of the page is cached and updated only every 60 seconds. When the Substitution control executes, it calls the GetCurrentDateTime method. The string returned by GetCurrentDateTime is displayed to the user. This section of the page is not cached and is updated each time the page is refreshed.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft