Substitution Constructor ()
Initializes a new instance of the Substitution class.
Assembly: System.Web (in System.Web.dll)
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.
Available since 2.0