Click here to Skip to main content
13,248,369 members (36,619 online)
Rate this:
Please Sign up or sign in to 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.
Posted 4-Jul-12 1:00am
Updated 4-Jul-12 1:18am
amitgajjar 4-Jul-12 6:30am
You really need to improve your english language.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Did you try something? Try using the javascript for your requirement. You can see millions of examples in Google[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

<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>[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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.
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.
Mits Machhi 14-Jul-12 0:16am
plz give me your code to solve the problem .

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 4 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100