H
huntco
I have a gridview control with a headertemplate (and other
templates). In that headertemplate, I have some controls (a textbox,
for example, used to filter the data in the gridview). When the user
clicks a button on the page (the "filter" button), I need to grab the
value (text) of that control - but I'm having a difficult time getting
a reference to it.
FindControl("controlName") doesn't do it. I've tried iterating
through all the controls (recursively) looking for one with the
"controlName" as the ID, but I've hit recursion "infinite loop"
warnings. Scoping for particular object types (to cut down on the
recursive loops) doesn't work either.
How do I reference an object at runtime that's buried several layers
within another object?
templates). In that headertemplate, I have some controls (a textbox,
for example, used to filter the data in the gridview). When the user
clicks a button on the page (the "filter" button), I need to grab the
value (text) of that control - but I'm having a difficult time getting
a reference to it.
FindControl("controlName") doesn't do it. I've tried iterating
through all the controls (recursively) looking for one with the
"controlName" as the ID, but I've hit recursion "infinite loop"
warnings. Scoping for particular object types (to cut down on the
recursive loops) doesn't work either.
How do I reference an object at runtime that's buried several layers
within another object?