I had done a demo of crosspage Postback but on this syntax
LblTARGET = (
Label)Page.PreviousPage.FindControl("LblSOURCE");it is returning null value.... that is the LblSOURCE control is not being detected even if it is in the source page
LblTARGET is a label control in the target page .
the total code is
if
(Page.PreviousPage != null){
LblTARGET = (
Label)Page.PreviousPage.FindControl("LblSOURCE"); if (LblTARGET != null)TxtTARGET.Text = LblTARGET.Text;
elseResponse.Write(
"UNSUCCESSFUL");}
The statement with response.write is getting executed even though
if (Page.PreviousPage != null) this condition is getting satisfied
PLEASE REPLY AS SOON AS POSSIBLE.
Pratibha KrishnanPosted Mar 27, 2008, 12:11 AM
how can its text be assigned to lblTarget.
Im just finding the control lblSOURCE and associating it to lblTarget .If its not null then only im playing with it stext property.
ArshadPosted Mar 18, 2008, 8:07 PM
Hi the thing is very clear,ur using
LblTARGET = (Label)Page.PreviousPage.FindControl("LblSOURCE");
r u using any text property in the previous page,coz in the above line the LblTARGET will get the text of the LblSOURCE.ok.thanks
Regards
Arshad khan