A
Andy B.
I have a search form that is inside the HeaderTemplate of a DataList
control. I need to get a reference to the checkbox inside the HeaderTemplate
so I can use the value in the control validation ServerValidate event. How
would I do this? I tried:
dim SearchByDateCheckBox as CheckBox =
DirectCast(DataList.Controls(0).FindControl("ByDateCheckBox"), CheckBox)
It gives me index out of range exception. I can't figure out how to do this.
I need it outside of any of the databound/datalist events like the
ServerValidate event. Any ideas how to do this?
control. I need to get a reference to the checkbox inside the HeaderTemplate
so I can use the value in the control validation ServerValidate event. How
would I do this? I tried:
dim SearchByDateCheckBox as CheckBox =
DirectCast(DataList.Controls(0).FindControl("ByDateCheckBox"), CheckBox)
It gives me index out of range exception. I can't figure out how to do this.
I need it outside of any of the databound/datalist events like the
ServerValidate event. Any ideas how to do this?