The form attribute returns null if control in not within the context of form. Retrieve the form attribute and examine its value.