The use of the first three controls is the same as that of winform. The image control can be imagined as a picturebox control. Next, let's review the properties of the control and learn new properties that comply with web features.
Checkbox control and radiobutton ControlThe checked attribute is used for both options. The text attribute sets the text on the control. The textalign attribute sets the text position in the control. The default value is right. When textalign = left, the file will be on the left side of the check box.
The radiobutton control is added to the container control as a logical group in winform to ensure that the radiobutton of a logical group can be selected in a single way, A groupname attribute is provided in the web. When the groupname attribute value in the page is the same, radiobutton ensures a single selected mode and does not support panel control.
The following isSource code:
Code
1 < ASP: checkbox ID = " Checkbox1 " Runat = " Server " Text = " Check box text on the left " Textalign = " Left " />
2 < BR />
3 < ASP: radiobutton ID = " Radiobutton1 " Runat = " Server " Groupname = " 1 " Text = " Single region 1 " />
4 < BR />
5 < ASP: radiobutton ID = " Radiobutton2 " Runat = " Server " Groupname = " 1 " Text = " Single region 2 " />
The groupname attribute values of two radiobutton instances are both 1, ensuring the single-choice mode of single-choice 1 and single-choice 2.
PanleThe widget can also be set as the container of the control. You can convert the tag in the control and its page into a logical unit. If the visible attribute of the Panel is false, this Panel and all the Members in the panel will also be hidden and invisible. If you adjust the attributes in the panel font, the font of the internal members will also change.
ImageThe imageurl attribute in the control sets the image path. A special attribute is descriptionurl. When the browser does not display the image due to special circumstances, it reads the text in the file with the property value, the image is displayed at the position of the image and serves as a prompt. The usage type is consistent with the alt attribute in longdesc attribute and alternatetext attribute value in HTML.
<Asp: Image id = "image1" runat = "server" imageurl = "~ /Denglu.gif "descriptionurl = "~ /Image interpreter .txt "alternatetext =" Login image "/>
For example, when an image appears normally, alternatetext can also be interpreted.