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
Niradhip ChakrabortyPosted Apr 20, 2009, 3:47 AM
mohdazeemuddin ahmedPosted Apr 20, 2009, 3:40 AM
Its nice one
Niradhip ChakrabortyPosted Apr 20, 2009, 3:30 AM
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 ahmedPosted Apr 20, 2009, 3:24 AM
brother at time of radio button creation what event i select
like
in this tag which event i select
Vimal KandasamyPosted Apr 20, 2009, 3:10 AM
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