I think you're running this page directly. the source of the NullException in your sample refers to PreviousPage. it does not contains a control named 'TextBox1' so >>> (TextBox)PreviousPage.FindControl("TextBox1"); <<< return null. if you write:
string msg = ((TextBox)PreviousPage.FindControl("TextBox1")).Te xt;
You'll got the error here. NullReferenceException
happy every time, happy every where
Last edited by irProject; February 14th, 2012 at 05:32 PM.