Simple use of Asp. Net control radio, asp. netradio

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.