I'm assuming that you want to change the visibility of the fields within the attribute table. If you wanted to modify this value against an existing layer you'd probably need to utilize ArcObjects and the code would center around the following logic.
ILayerFields layerFields = (ILayerFields) layer; for (int i = 0; i < layerFields.FieldCount; i++) layerFields.FieldInfo.Visible = false;
If you want to create a new layer then you'd probably want to leverage a tool that would allow you to utilize a FieldInfo object.
Make Feature Layer
Make Table View
yes. I have a whole gdb schema that users load data into. if they don't have any data load into a particular field they just leave it blank, but some of the features have 40 fields and 10 will be empty. it doesn't show well in web apps when in the attribute table or popup there are all of these fields with no values in them. thank you everyone that is helping.