M
mattsthompson
I am trying to change the look of a panel but only if that panel's ID
is returned by a database lookup.
I've tried using FindControl but this returns Controls and not
WebControls and I'm having difficulty converting items.
I'm coding in C#
I was hoping to do something along the lines of:
-- quote --
Control hControl = Page.FindControl(dr.GetString(4));
hControl.CssStyle = "MenuItemSelected";
-- end quote --
But the last line doesn't quite work ;o)
is returned by a database lookup.
I've tried using FindControl but this returns Controls and not
WebControls and I'm having difficulty converting items.
I'm coding in C#
I was hoping to do something along the lines of:
-- quote --
Control hControl = Page.FindControl(dr.GetString(4));
hControl.CssStyle = "MenuItemSelected";
-- end quote --
But the last line doesn't quite work ;o)