PreviousPage | asp.net 2.0
-
hi, currently i m working in asp.net 2.0 (2005). 1st time i m using the previousPage process.i tried to retrive a hidden variable (source page) value to my destination page. 1. i set the PostBackURl as my destination page on the button click on source page 2. i put the following coding in the destination onload event.
if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
Label1.Text = System generated ID : " + Convert.ToString(PreviousPage.FindControl("HidTest"));but always the PreviousPage is null and not coming inside the loop. help me please - Karan
-
hi, currently i m working in asp.net 2.0 (2005). 1st time i m using the previousPage process.i tried to retrive a hidden variable (source page) value to my destination page. 1. i set the PostBackURl as my destination page on the button click on source page 2. i put the following coding in the destination onload event.
if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
Label1.Text = System generated ID : " + Convert.ToString(PreviousPage.FindControl("HidTest"));but always the PreviousPage is null and not coming inside the loop. help me please - Karan
Hi, you say PreviousPage is always null. When is the code you posted actually run? If it is on a postback, PreviousPage is null, because there is no PreviousPage then. You should save the value in a "If(!IsPostback)" part of your page load. This is just a guess i'm afraid. Good Luck