I have two pages, named receipt.aspx and checkoutform.aspx. My
checkoutform.aspx page has an orderid property and uses a
Response.Redirect("receipt.aspx") to send the user to to receipt.aspx. My
receipt.aspx page has the following directive:
<%@ PreviousPageType VirtualPath="~/checkoutform.aspx" %>
But when I use the following expression:
Me.PreviousPage.orderid
I recieve an Object is not set to an instance of an object error. What am I
forgetting? Thanks.

Signature
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
bruce barker - 13 Dec 2007 16:48 GMT
PreviousPage only works with a ServerTransfer. this is because with a
transfer, the new page instance is created by old instance, so they both
exist at the same time.
with a redirect, the last page instance no longer exists, as it was
destroyed after the response was sent to the browser.
-- bruce (sqlwork.com)
> I have two pages, named receipt.aspx and checkoutform.aspx. My
> checkoutform.aspx page has an orderid property and uses a
[quoted text clipped - 9 lines]
> I recieve an Object is not set to an instance of an object error. What am I
> forgetting? Thanks.