I am trying to find a control on a content page from the content page codebehind. I can find controls on the master page adding a Master. to the find control, but for some reason can't find them on the content page.
Here is my code.
al.Add("hf0")
al.Add("hf1")
al.Add("hf2")
al.Add("hf3")
al.Add("hf4")
For i = 0 To al.Count - 1
Dim hfTemp As HiddenField = CType(FindControl(al(i)), HiddenField)
Dim hfTempValue as string = hfTemp.value Next
I get an error Object reference not set to an instance of an object.
Go to the complete details ...