Object reference not set to an instance of an object

Why is it that I am having an error on this code.

Response.Write(((TextBox)PreviousPage.FindControl("txtMemberName")).Text);

Since, I am using a master page I change it into

Response.Write(((TextBox)cPlaceHolder.FindControl("txtMemberName")).Text);

and still it doesn’t work. I still got the same error.
Can anyone help me please.

Most probably txtMemberName is not visible you can try by debbuging see collection content of cPlaceHolder.Controls. If txtMemberName is inside any other control in cPlaceHolder you have to refrence first to that control and then recurrencing to this textbox.