|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding | |
ASP.net checkbox.Checked function?
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | ||||||||||||
|
WaterCooler
|
I am trying to make a site that allows a user to sign up for baseball tickets. Part of that site has a checkbox next to each for the three types of seat types (bleacher, box, gen admission). I want it so that when I check a box it will make a txt box visible to allow the user to enter the number of seats. It works fine ATM but only after I change the view and go back can I do this instantaneously? . . . . Here is my simple coding for the method:
Code:
protected void cbxBox_CheckedChanged(object sender, EventArgs e)
{
lblBoxNum.Visible = true;
txtBoxNum.Visible = true;
}
__________________
XPS M1330: T7500, 4GB, 13.3" LED WXGA, 128 8400 GS, 120GB 5400RPM, 802.11 AGN, 9 cell, Fingerprint, Ultimate x64, 4 Year Accidental Damage/lojack/warranty. __________________
|
||||||||||||
|
|
|
|
#2 (permalink) | ||||||||||||
|
Programmer
|
be sure to set AutoPostBack="true" in CheckBox control
__________________
"If there is a god, I hope he has a good excuse" Woody Allen
|
||||||||||||
|
|
|
|
|
#3 (permalink) | |||||||||||||
|
Bifford
![]() |
I am not sure what you mean by "change the view." If you want to show the textbox without causing a full post-back you will need to either write some custom javascript functions or use ajax. You can check out MSAJAX at ajax.asp.net, it is really easy to use and great for doing things like this. It will make your page execution much smoother to the end-user with minimal effort on your part.
__________________
Helpful Posts (Hopefully )Overclocker's Calculator Photo Editing - B&W w/Color Accents
|
|||||||||||||
|
|
|
|
#4 (permalink) | |||||||||||||
|
WaterCooler
|
Thank you . . you're amazing
![]() Quote:
![]()
__________________
XPS M1330: T7500, 4GB, 13.3" LED WXGA, 128 8400 GS, 120GB 5400RPM, 802.11 AGN, 9 cell, Fingerprint, Ultimate x64, 4 Year Accidental Damage/lojack/warranty. __________________
Last edited by DanNEBTD : 02-16-08 at 12:50 AM. |
|||||||||||||
|
|
|
|
#5 (permalink) | ||||||||||||
|
Programmer
|
no problem
![]()
__________________
"If there is a god, I hope he has a good excuse" Woody Allen
|
||||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|