Click here to Skip to main content
15,794,475 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Dear all,

I am working on SURVEY PROJECT. (ASP.Net, C#, SQLSERVER 2005)

I have 15 Questions with Yes or NO Radio buttons on webform. its working fine and storing in database after submit button click.

Now , BESIDE that radio buttons I have a check box and TEXTBOX.

When i check(Tick) the Checkbox, The textbox should be displayed and User should enter the comments in the textbox and he should the submit it.

Note : if the user checks the CHECKBOX....the TEXTBOX must be displayed beside that checkbox....if not dont display.

Please can anybody can give the solution for this ?

Thank you very Much.
Updated 4-Jul-12 1:18am
AmitGajjar 4-Jul-12 6:30am    
You really need to improve your english language.

Did you try something? Try using the javascript for your requirement. You can see millions of examples in Google[^]
Share this answer
<script language="javascript" type="text/javascript">
function forRentClicked(sender)
            var tb1 = document.getElementById('<%= TextBox1.ClientID %>');
   = sender.checked?'inline':'none';

<asp:checkbox id="CheckBox1" runat="server" onclick="forRentClicked(this)" checked="true" />
<asp:label id="Label1" runat="server" text="Rental rate per week:"></asp:label>
<asp:textbox id="TextBox1" runat="server" ></asp:textbox>[^]
Share this answer
Use this i:

Make Checkbox Autopostback Property True. and textbox visible=false

Then Double click on Checkbox :

if not help to you , please post it.
Share this answer
Ubaid ur Rahman IT 4-Jul-12 7:11am    
Thanks, it is Working Fine.
iamnishi 13-Jul-12 4:57am    
i didnt work out...
i have textbox and label and by checking the checkbox the text feild is still not visible. I have set the property of textbox false. and on checking the Checkbox it will become visible. but is it not happening. me out with a solution.
[no name] 14-Jul-12 0:16am    
plz give me your code to solve the problem .
Nandhu_nands 13-Jun-19 1:33am    
same thing how to do when i click ok button in message box

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