Avatar of Siv
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

ASP.NET PreviousPage question

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,

ASP.NETVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon