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