Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Problem Using PreviousPage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan Sokalski - 13 Dec 2007 16:40 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.