Asp.net Radiobutton control
lecturer: Omeed Mustafa Mohammed
institute: Da Vinci institute (duhok)
Size: 675.43 KB
Language: en
Added: Jan 01, 2022
Slides: 10 pages
Slide Content
ASP.NET RadioButton Control Department of Computer WEB – GRADE 5 Lecturer. OMEED M. M 11/08/2021 Lecture 5
RadioButton Control 11/13/2021 Mr.Omeed M. M 2
RadioButton Control - Radio Button control is used, when you want the user to select only one option from the available choices . - Radiobutton is used to allow user to select a single radiobutton from group of radiobutton . In a asp.net generally we use more than one radiobutton and select only one radiobutton at a time from all the radiobutton control. 11/13/2021 Mr.Omeed M. M 3
RadioButton Control 11/13/2021 Mr.Omeed M. M 4
Important Properties of the Radio Button Control Checked - This is a boolean property, that is used to check if the button is checked or not. Text - This is string property used to get or set the text associated with the radio button control TextAlign - right or left. On which side of the radio button the text should appear 11/13/2021 Mr.Omeed M. M 5
Important Properties of the Radio Button Control AutoPostBack - Set this property to true, if you want the webform to be posted immediately when the checked status of the radio button changes . Group Name - By default, the individual radio button selections, are not mutually exclusive. If you have a group of radio buttons, and if you want the selections among the group to be mutually exclusive, then use the same group name for all the radio button controls. 11/13/2021 Mr.Omeed M. M 6
Methods of a RadioButton Control: Focus - Set input focus onto the control. 11/13/2021 Mr.Omeed M. M 7
Event of the Radio Button Control CheckedChanged - This event is fired when the checked status of the radio button control is changed 11/13/2021 Mr.Omeed M. M 8
How to add RadioButton ? < asp:RadioButtonID = "RadioButton1" runat = "server" Text= "Male" GroupName = "gender" /> or We have a toolbox in ASP.NET so first we need to drag the given ‘ radiobutton ’ control in the web form from the toolbox 11/13/2021 Mr.Omeed M. M 9
Any Questions ? 11/13/2021 10 MR. OMEED M. MOHAMMED