I have a hidden field in my master page. I default the value to "Start"
On my master page, I have a function that sets the value of the hidden field. I change it to "Save" in the codebehind:
hdnIsDirtySave.Value = "Saved"
Dim p As Web.UI.Control = control.Parent
While Not (TypeOf p Is System.Web.UI.HtmlControls.HtmlForm)
p = p.Parent
.Append(Microsoft.VisualBasic.Chr(13) & Microsoft.VisualBasic.Chr(10))
BTW, I have also tried these and they just return null: