I'm creating custom UserControl in ASP.NET and I'm using System.ComponentModel.Attributes to decorate properties with different things. By default, ASP.NET shows all public GET; SET properties of a control in properties window on ASPX page. What attribute I can use to ignore some of the properties ?
I tried to find something related to "ignore" on http://msdn.microsoft.com/en-us/library/system.componentmodel.aspx page, but didn't find anything.
Thanks
You need BrowsableAttribute
Specifies whether a property or event should be displayed in a Properties window.
[Browsable(false)]
public int MyProperty { get; set; }
You should be able to hide the property with [Browsable] attribute.
Specifies whether a property or event should be displayed in a Properties window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With