I think you say you are pulling from a page that "has" a masterpage?
If so, you need to reference the real control name which you can find
by turning on trace in the page header.
Then, after you have the real field name, you can do something like
Default sourcePage = (Default)PreviousPage;
TextBox textBoxTargetWeight =
Don't forget (like I did) the reference to your Default class in the
Previous Page like this:
<%@ PreviousPageType VirtualPath="~/Default.aspx" %>