Hi every body
i am developing one web application project
in my project there is one job application form
i used some labels,text box,drop down list and two radio button OK
now my question is if any user select the radio button say yes then he will see some label display beside to radio button and if
select No then the label which is visible when he select Yes should disable how can i do this what event i have to use
please help me
thanks to all hints
Loading

Vimal KandasamyRank #2,151 · 661 reputationPosted Apr 19, 2009, 11:10 PM EDT
Initially, you set labels and other controls visibility as false.
set AutoPostBack property of radiobutton as true
after a radiobutton checked,set visibility as true in checked changed event..like below
protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { if (RadioButton1.Checked == true) { //code to visible/disable controlsmohdazeemuddin ahmed125 reputationPosted Apr 19, 2009, 11:24 PM EDT
brother at time of radio button creation what event i select
like
in this tag which event i select
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Apr 19, 2009, 11:30 PM EDT
you can do it using javascript: check the following code:
<
table cellpadding="0" cellspacing="0" width="100%" border="0"> <tr align="left"> <td> <asp:RadioButton ID="rdYes" GroupName="rdYes" runat="server" Text="yes" onclick="enable();" /> <asp:RadioButton ID="rdNo" GroupName="rdYes" Text="no" runat="server" onclick="enable();" /> td> tr> <tr align="left" id = "trLabel" style="display:none;"> <td><asp:Label ID="lblDisplay" Text="Clicked on Yes" runat="server">asp:Label> td> tr> table><
script type="text/javascript" language="javascript"> function enable(){
if(document.getElementById("rdYes").checked ==true){
document.getElementById(
"trLabel").style.display = '';}
else{
document.getElementById(
"trLabel").style.display = 'none';}
}
script>mohdazeemuddin ahmed125 reputationPosted Apr 19, 2009, 11:40 PM EDT
Its nice one
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Apr 19, 2009, 11:47 PM EDT