473,471 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ASP and hidden textBox

Hi,

I've a webPage, which has a checkbox.
i want that when the checkbox is checked, a textbox will be created and
showen under the checkbox.
How can i do it?

Thanks,
Gidi.
Sep 17 '07 #1
1 2115
Hi,

"Gidi" <sh*****@hotmail.com.dontspamwrote in message
news:EC**********************************@microsof t.com...
Hi,

I've a webPage, which has a checkbox.
i want that when the checkbox is checked, a textbox will be created and
showen under the checkbox.
How can i do it?
My suggestion is that the Textbox be always there, just invisible ( using
Textbox.Visible = false;)
so when the checkbox is checked you change it to visible

like this:

<asp:CheckBox runat="Server" ID="ChangeLocationCHK" Checked="false"
AutoPostBack="true"
OnCheckedChanged="ChangeLocation_Checked"
Text="Change Agent Location" />
<asp:TextBox runat="Server" ID="NewCodeTXT" visible="false"></asp:TextBox>
in the code behind:
protected void ChangeLocation_Checked(object sender, EventArgs e)
{
NewCodeTXT.Visible = ChangeLocationCHK.Checked;

}
Sep 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Maurice Mertens | last post by:
Hi, having some troubles with a BOUND textbox. The BOUND (text property) textbox is hidden on the form. Just before I update the database I stopped the code in debug and when I use me.C_ID.text...
3
by: Rajesh | last post by:
Hello all, I have a problem here. I have a procedure called FillForm() where I populate values for some hidden asp:textboxes. But after I do a postback, my values in the textboxes are lost and I...
3
by: neverstill | last post by:
hi- I need to have an asp:TextBox that will allow me to set the type attribute to hidden. I can't seem to find a way to do this. Basically, I have a Wizard application that will show/hide...
3
by: simon | last post by:
I have input html control in my dataGrid. When user click some button I would like to get it's value from codeBehind. <ItemTemplate> ....... <input type=hidden runat=server id="txtExists"...
5
by: Rob T | last post by:
I have a user control that need to have a hidden textbox. (I have some JS that needs to get some info out of it) If I make a standard textbox (<asp:TextBox ID="txtTest" Runat="server" />) in my...
2
by: Rodusa | last post by:
I have a hidden field inside one datagrid which I can't get to make it keep its state after a postback event. Look field: <input type="hidden" id="TxtHiddenItem_id" name="TxtHiddenItem_id"...
1
by: Brent Burkart | last post by:
I have a textbox that is being used for a CustomValidator control, however I would like that textbox to be hidden. If I set the visible property to false, the CustomValidator will not work. Any...
1
by: Pieter | last post by:
Hi, Is there a way to link the Hidden-property of a Textbox on a Reporting Services Report to it's Value? When the Value is empty (""), then I want the TextBox be Hidden. In case you don't...
1
by: Jeff User | last post by:
hi all Using C#, .NET1.1. I need to pass a string of text to the final html output and then capture it with java script on the client side. I found that I can place my string in and then...
4
by: minchazo | last post by:
Hello, I've been creating some forms recently in Access 2003 and using hidden textboxes quite a bit. As an example, the visible textbox CasesDone uses the DLookup function to sum the records in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.