Each web control has a lot of properties for customization. These properties can be set by the developer during design time or runtime with different predefined values. Such a property is BorderStyle, which is used to set the border of the web controls. This property has a lot values like Solid, dotted etc etc..
Along with these values there are two values like NotSet and None about which I want to draw your attention. On the first view, they may feel like doing the same job but there is a vast difference in between them.
When you set the BorderStyle = NotSet then you expect the the border is not set for your control, also when you set it as BorderStyle = None then also you expect that the border will not set. Then what is the big difference in between them.
Example1:
The above one is rendered as
When you set the BorderStyle = NotSet, then in the style attribute the border style property is not defined. It leaves the property to be set by the control itself. So while rendering that control the BorderStyle property is not defined in the style attribute of the rendered HTML. So in this case the control take the default border style.
Example2:
The above one is rendered as
But when you set the BorderStyle = None, then in the style attribute the property is specifically defined not to set the value. So in this case the rendered HTML of the control have specifically defined that property not to set to any value. So in this case the border is not set atall.
So when you do not want to give a border to your web control the BorderStyle proeprty to None.