Hello,
I am trying to pass values between two aspx page using PreviousPage; I tried the suggested two ways:
- Adding PostBackUrl to the button in the first page to go to go to the second page. Then using the Page.PreviousPage.FindControlRecursive in the Page_Load method of the second page code behind to get the value of the fields in the first page.
- Adding a get method in the first page code behind and then adding the directive <%@ PreviousPageType VirtualPath="~/Default.aspx" %> in the second page; then using PreviousPage.field to access the field.
Seems like whatever I do, PreviousPage is always null.....looked into internet but nothing seems to help my case.
Mainly I followed http://msdn.microsoft.com/en-us/library/6c3yckfw(v=vs.140).aspx
Your suggestions would be highly appreciated.
Kind Regards,
Chitra