troubleshooting Question

ASP.NET PreviousPage question

Avatar of Siv
SivFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASP.NETVisual Basic.NET
7 Comments1 Solution555 ViewsLast Modified:
I have a first page with a ListView on it that has a "select" entry in the first column that uses a LinkButton which when clicked triggers the SelectedIndexChanging event.  A code behind routine stores the Database ID field of the row being selected in a public Property of the first page called "SelID". That's working fine.

After storing the SelID I then go to the second page (using a response.redirect).  In the Page_Load of the second page I then want to pick up the SelID from the previous page and use that to populate my screen from the database. For some unknown reason when I test the PreviousPage it's always set at Nothing?

I have added the following line to the top of the second page's source:

<%@ PreviousPageType VirtualPath="~/firstPage.aspx" %>

Is it down to the fact that I have used a response.redirect or am I missing something else?

Any Help appreciated,

Imran Javed Zia
Consultant Software Engineer - .NET Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros