The web controls used on a web page are implemented by classes of their names in the .NET Framework. You can use the class of a control to manipulate or manage it. Because web controls are firstly made to function on a web page, they are created as HTML tags. Each attribute as a name and can have a value. To visually identify an attribute, on a web form, click the control. In the Properties window, click the Properties button. To specify or change the value of an attribute, click its name and type the value. To manually access an attribute, type its name in the control's tag. To specify its value, assign it to the attribute. The formula is: <asp:Web-Control Attribute="Value"></asp:Web-Control> The attributes of a web control are stored in a list named Attributes. To programmatically get the list of attributes of a control, type its ID, followed by a period, followed by Attributes.
To use a control on the form, the control must be enabled. This characteristics is controlled by a Boolean attribute named Enabled. Its default value is True, which means the control can be used. If you want to disable a control by default, set this attribute to False.
To navigate among the controls on a web page, a visitor can keep pressing Tab. To help the user quickly move to a control, you can make it possible to press Alt + a key on the keyboard. To support this, the controls are equipped with an attribute named AccessKey. To visually specify an access key, on the form, click the control. In the Properties section of the Properties window, click AccessKey and type a letter, such as A. Then, to access that control, the visitor can press Alt + A.
When you add a control to a web form, it assumes some default dimensions, especially the width. If the default width is not right, you can change it. To visually change the width in Microsoft Visual Studio or Microsoft Visual Web Developer, you can click the control, position the mouse on the right side, and drag to the right or to the left. As an alternative, click the control. In the Properties window, click Width and type the desired value.
When designing a control, you can specify its characteristics in the Properties window or using the attributes of the control's tag. An alternative is to create a style sheet that contains the desired classes. To visually specify the desired class of a style to be applied to a control, on the form, click the control. In the Properties section of the Properties window, click CssClass and type the name of the CSS class. To manually specify the CSS class, access its CssClass attribute and assign the CSS class name to it. |
|
|||||||||||
|