Hi Jelmer,
Based on my understanding, the PreviousPage is set only when the postback page is in the same web application. And please do check if the property is null before proceeding. Hope it helps.
if (PreviousPage != null &&
PreviousPage.IsCrossPagePostBack &&
PreviousPage.IsValid)
Zhao Ji Ma
Sincerely,
Microsoft Online Community Support
?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?