473,321 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

how to handle teboxes in .net

Hello,
I'm very new to on programing with .net and i would really appreciate the help.
my problem is I have a form that is called add products, one of the fields is not a texbox, but I have 2 checkboxes, Case and Unit, depedning on what the user needs. how would i implement this on my page once the user checks one of the text boxes and filles the rest of the form and clicks on the save or Add button.

thanks

nueva
Oct 2 '07 #1
3 1019
jimmarq
12
Hello,
I'm very new to on programing with .net and i would really appreciate the help.
my problem is I have a form that is called add products, one of the fields is not a texbox, but I have 2 checkboxes, Case and Unit, depedning on what the user needs. how would i implement this on my page once the user checks one of the text boxes and filles the rest of the form and clicks on the save or Add button.

thanks

nueva
You could create two panels that contain the controls you want to display when each of the check boxes is checked. Panels are the ASP.NET equivalent to DIV tags, but they can be access programatically. You can set the visible property in your code behind page.

Create pnlCase and pnlUnit, and populate them with the controls you want to show up when either Case or Unit is selected. If Case is checked first by default, make pnlCase visible, and set pnlUnit's visibility to false..

Use the checkbox events to display and hide the panels based on what controls you want to show.

Hope that helps.
Oct 2 '07 #2
thank you for the tip


nueva
Oct 2 '07 #3
Frinavale
9,735 Expert Mod 8TB
Hello,
I'm very new to on programing with .net and i would really appreciate the help.
my problem is I have a form that is called add products, one of the fields is not a texbox, but I have 2 checkboxes, Case and Unit, depedning on what the user needs. how would i implement this on my page once the user checks one of the text boxes and filles the rest of the form and clicks on the save or Add button.

thanks

nueva
If you don't want to write a client side script to hide and show your panels you could always set the checkboxes to AutoPostback.

Then in the method that handles the postback for the check boxes, set whatever controls you need to be visible...and the ones you don't to be invisible.

Be aware that if you set Mylabel.Visible = False in your .NET server side code, your label will never be rendered in the browser. The same goes for any .NET control.

-Frinny
Oct 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
7
by: Tony Johansson | last post by:
Hello!! Assume I have a handle body pattern with classes called Handle and Body. In the Body class I store one int value for example 7 or some other integer value. In the Handle class I have...
0
by: Tony Johansson | last post by:
Hello! Here I have two classes these are called Handle and Body and a main. You have the class definition below. Some basic information. In the Handle class is there a pointer to the Body. Each...
2
by: Indiana Epilepsy and Child Neurology | last post by:
Before asking this questions I've spent literally _years_ reading (Meyer, Stroustrup, Holub), googling, asking more general design questions, and just plain thinking about it. I am truly unable to...
14
by: Howard | last post by:
Hi, I recently had a problem where I decided to store objects in a vector. (Previously, I had always stored pointers in vectors). Well, naturally, when storing an object in a vector, using...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
7
by: Ken Varn | last post by:
I am working in managed C++. I have a Mutex object in which I need to replace the Handle property with a new handle. The new handle is being constructed using Win32 CreateMutex call. I need to...
13
by: Abhishek | last post by:
Hi, how do I pass the handle of a control to the win32 api mouse_event. so that it will create the click event on that application only even if there is any other window in front of it. I dont...
2
weaknessforcats
by: weaknessforcats | last post by:
Handle Classes Handle classes, also called Envelope or Cheshire Cat classes, are part of the Bridge design pattern. The objective of the Bridge pattern is to separate the abstraction from the...
3
by: Peterwkc | last post by:
Hello all C++ expert programmer, I have a handle class which point to another class and use the pointer as object. I follow the code from C++ articles submited by someone in this forum....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.