In ASP.net I have two similar pages that display summary information. I would like to pull from these pages a property value to display detailed information about the selected record in a detail page. I was successful in doing it for just one summary page using the @PreviousPageType reference.
<%@ PreviousPageType VirtualPath="~/SOURCE1.aspx" %>
But It soon appeared that I needed another page as a feeder. Unfortunately from what I have read it seems that you cannot have multiple PreviousPageTypes
According to: http://msdn.microsoft.com/en-us/library/ms178139%28v=vs.100%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-6 I should be able to do something similar with reference:
<%@ Reference VirtualPath="~/SOURCE1.aspx" %>
I'm not sure how to cast the page though as I'm not sure what 'SourcePage_Aspx is in the code below which incidentally is from the link above.
SourcePage_aspx sourcePage;
sourcePage = (SourcePage_aspx) PreviousPage;
Label1.Text = sourcePage.CurrentCity;
I know that to use a reference you have to cast it but, how is this done? Could someone please point me in the correct direction?