Purushottam Rathore

Purushottam Rathore

  • 217
  • 8.7k
  • 8.8m

How to access content of one page to another page?

Aug 6 2009 12:06 AM
Suppose I have two pages in my application. On the first page I have used a Button named 'Button1'. i want to use that 'Button1' on Second page.

Here i have used this code on second page to find button

protected void Page_Load(object sender, EventArgs e)
{
    Button btn = (Button)PreviousPage.FindControl("Button1");
}

Answers (3)