TemplateStack Class

Represents a last-in-first-out (LIFO) collection of ITemplateFile template files.

Inheritance Hierarchy

System.Object
  System.Web.WebPages.TemplateStack

Namespace:  System.Web.WebPages
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public NotInheritable Class TemplateStack
'Usage
public static class TemplateStack
public ref class TemplateStack abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type TemplateStack =  class end
public final class TemplateStack

The TemplateStack type exposes the following members.

Methods

  Name Description
Public methodStatic member GetCurrentTemplate Returns the current template file from the specified HTTP context.
Public methodStatic member Pop Removes and returns the template file that is at the top of the stack in the specified HTTP context.
Public methodStatic member Push Inserts a template file at the top of the stack in the specified HTTP context.

Top

Remarks

The WebPageExecutingBase class implements this interface, so most template files are of type WebPageExecutingBase or of a type that inherits from WebPageExecutingBase.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.WebPages Namespace