I have a scenario where I need to conditionally slide up (or hide) sets of controls/elements. I like the answer I found here from QBM5 about assigning data-groups to the control
First off, please notice that DataGroup
or data-group
is nothing predefined, it's an HTML5 data-* attribute which can be named anything you like.
Since you are working with ASP.NET and WebForms, you can use the Attributes
collection on your TextBox
element like this:
boxRequesterName.Attributes.Add("data-group", "1");
See on MSDN WebControl.Attributes and AttributeCollection.