Simple use of Asp. Net control radio, asp. netradio
Js:
<script type="text/javascript"> function ok() { document.getElementById("txtPassword").disabled = false; } function no() { document.getElementById("txtPassword").disabled = true; } </script>
Add the radio control:
<Label> <input type = "radio" name = "group" onclick = "OK () "/> Yes </label> <input type =" radio "name =" group "onclick =" no () "/> no </label>
Add a textbox Control:
<input type="text" id="txtOldPassword" disabled="true"/>
The preceding figure shows the Editable and uneditable status of the textbox Control.
Aspnet C # how to determine whether the html-generated radio control is selected
All the value controls in the html form are submitted with the key value key = value &......
This form is submitted to the background.
The same is true for radio. The value of the selected radio is returned to the background, and the value of Request ["radio name"] is used in the background. If a value exists, it is selected.
For example:
<Input type = "radio" value = "1" name = "rdo1" checked = "checked"/>
<Input type = "radio" value = "2" name = "rdo1"/> B
The value can be set in the background as follows: Request ["rdo1"]
Value: 1
Another problem is hi me.
Why is text not displayed after the value is set when the html radio control is used in ASPNET?
The text behind the radio control is not controlled by value. The text must be written behind the radio control.