-1

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.";
        }
Votes + Comments
Where is code tags?
4
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by __avd
0
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.";
           }
       }
       
    }
0

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]

0

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 by happygeek: fixed formatting

0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.