Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear FRNDS,

I have 3 radio buttons as Admin, Manager,User
and also I have another 2 radio buttons as Display , Display and Print.

So My requirement is when i select User(Radiobutton) the other DisplayANDprint(Radiobutton must hide)


Please help , how to do this.

Thanks.
Posted

C#
if radiobtn1.selected==true
{
  radiobtn2.visible= false;
}
 
Share this answer
 
v2
Comments
Ubaid ur Rahman IT 23-Jul-12 5:54am    
Am using radio button list, how to do this.
Hi,
Under the hood, you can access the attributes of the item and assign it a CSS style.

So you should be able to then programmatically assign it by specifying:
C#
RadioButtonList.Items(1).CssStyle.Add("visibility", "hidden");

and get the job done.



--Amit
 
Share this answer
 
C#
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {

            if (RadioButtonList1.SelectedValue.ToString() == "1")
            {
                RadioButtonList2.Visible = true;
             }
            else if (RadioButtonList1.SelectedValue.ToString() == "2")
            {
                rdoPowerAvail.Visible = false;
             }
       }
    }


check with your controls once...
 
Share this answer
 
v3
Hi Rahman u try it through javascript by finding radio button id so that there will be no load on server side. Definitely u will get it. If u have any doubt on that means ask...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900