Hey Guys,
Is there any problem in the following code:

TextBox test = (TextBox)Page.PreviousPage.FindControl("search");
        if (PreviousPage != null)
        {
            if (PreviousPage.IsCrossPagePostBack == true)
            {
                Label1.Text = test.Text;
            }
        }
        else
        {
            Label1.Text = "Not a cross-page post.";
        }
Comments
Where is code tags?
protected void Page_Load(object sender, EventArgs e)
    {

        if (Page.PreviousPage != null)
        {
           TextBox test = (TextBox)Page.PreviousPage.FindControl("search");
           if (PreviousPage.IsCrossPagePostBack == true)
           {
               Label1.Text = test.Text;
           }
           else
           {
               Label1.Text = "Not a cross-page post.";
           }
       }
       
    }

anuj576,
88th post and you forgot to use code tags.

chithrasujith,
Source code must be wrap up with bb code tags.

[code=asp.net] ....

[/code]

88th post and you forgot to use code tags.

chithrasujith,
Source code must be wrap up with bb code tags.
[noparse]
[code=asp.net]
....
[/code]
[/noparse]

Thanks for pointing out.
Chithra

Edited 3 Years Ago by happygeek: fixed formatting

Did you get solution of your problem? If yes then mark this thread as solved. If it is not resolved then ask us.

This question has already been answered. Start a new discussion instead.