asp.net.ph

Skip Navigation Links

@ PreviousPageType

ASP.NET Syntax   ASP.NET Page Syntax   Page Directives


.NET Framework version 2.0

Provides a way to get strong typing against the previous page, as accessed through the PreviousPage property.

<%@ PreviousPageType attribute = "value" [ attribute = "value" ... ] %>

Attributes


Term Definition
TypeName Specifies the type name for the previous page.
VirtualPath Specifies the path to the file that generates the strong type.

Remarks

The @ PreviousPageType directive is used to get strong typing against the PreviousPage property. The @ PreviousPageType directive can only be used on a Web Forms page ( an .aspx file ). If both attributes, TypeName and VirtualPath, are defined, the @ PreviousPageType directive will fail.

Syntax Example

The following code example demonstrates how to specify the path to a file that generates the strong type.

<%@ PreviousPageType VirtualPath = "~/SourcePage.aspx"%>
See Also

Page.PreviousPage Property


Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note