can anyone plzzz help out to write code in c# that i have kept one radio button and one textboxes and one label button .....once the radiobutton is clicked the textbox and label should get displayed....ot herwise it should be in hidden state......
can u plz help me ...its urgent
Collapse
X
-
-
i tried this but im not getting the output.....and also once the raddiobutton is clicked its not getting deselected
Originally posted by nmsreddiHello
Make auto postback property of radio button to true and write code in changed
event of the control
if(radiobutton1 .checked==true)
{
label1.visible= true;
---
--
}
else
{
label1.visible= false;
}
try it out it works fineComment
-
Originally posted by saloplz members help me
U can use Checkbox instead of Radio button? is there any restriction for that?Comment
-
Hi,
This is the answer..
try this
private void FrmBook_Load(ob ject sender, EventArgs e)
{
rbClick.Visible = true;
rbClick.Check= false;
lbvalue.Enabled = false;
txtValue.Enable d = false;
}
private void rbClick_Click(o bject sender, EventArgs e)
{
rbClick.Check= true;
lbvalue.Enabled = true;
txtValue.Enable d = true;
lbvalue.Visible = true;
txtValue.Visibl e = true;
}
These are the things you have to write in the form load method and the event handler rbClick_Click() method...
in the UI there will be one radio button, one label and one textbox.initial ly both of them will be hidden.once you click on the radio button it will be shown,the enabled property is the key..ok?
Regards,
TeenzoneZComment
Comment