In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains the "ASP.NET radio button control RadioButton common properties", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "ASP.NET radio button control RadioButton common properties" bar!
1. Common attributes:
(1) Checked property: used to set or return whether the radio button is selected. The value is true when selected and false if it is not selected.
(2) AutoCheck property: if the AutoCheck property is set to true (the default), all other radio buttons in the group are automatically cleared when the radio button is selected. For the average user, there is no need to change this attribute, just use the default value (true).
(3) Appearance property: used to get or set the appearance of the radio button control. When it is Appearance.Button, it makes the radio button look like a command button: when it is selected, it appears to have been pressed. When the value is Appearance.Normal, the default radio button looks like.
(4) Text property: used to set or return the text displayed in the radio button control. This property can also contain access keys, that is, preceded by "&"
Symbol so that the user can select the control by pressing the Alt key and the access key at the same time.
2. Common events:
(1) Click event: when a radio button is clicked, the value of the Checked property of the radio button is set to true, and the Click event occurs.
(2) CheckedChanged event: the CheckedChanged event is triggered when the value of the Checked property is changed.
The radiobutton in WPF may be a little different from that in Web. There are no attributes such as group. When using, put the same group of radiobutton directly into a groupBox or panel, and they will automatically be a group. There are two ways to use it (to determine which one is selected):
The first method:
The copy code is as follows:
Foreach (Control ctrl in groupBox1.Controls)
{
If (ctrl is RadioButton)
{
If ((RadioButton) ctrl) .Checked)
{
/ / add the actions you need
}
}
}
The second way: add events to each radiobutton
The copy code is as follows:
Private void radioButton_CheckedChanged (object sender, EventArgs e)
{
RadioButton rb= (RadioButton) sender
If (rb.Checked)
{
/ / add the actions you need
}
}
Thank you for your reading, these are the contents of "what are the common properties of ASP.NET radio button control RadioButton?" after the study of this article, I believe you have a deeper understanding of what the common properties of ASP.NET radio button control RadioButton have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.