473,395 Members | 1,541 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,395 software developers and data experts.

ASP .net bug when changing stae of radio button..?

Hi all,

I just came across the following situation. I have three radio buttons
within the same group name, next to each of them I do have a
textbox (total 3 radiobuttons, 3 textboxes). I start with one
Textbox with its ReadOnly property to be true next to the defaulted
radiobutton that is checked. Then, I define that my event handler
for the CheckedChange event should define the ReadOnly property false
next to the radiobutton that I just checked. That is switching from True to
False. The change does not take place. After re-compiling the whole solution
and refreshing the page, the status of the Textbos remains the same after
I change the status of the RadioButton. Here it is what I have.
Is there anything wrong?

private void InitializeComponent()

{

this.rbNAcontactYT.CheckedChanged += new
System.EventHandler(this.rbNAcontactYT_CheckedChan ged);

..

..

}

private void rbNAcontactYT_CheckedChanged(object sender, System.EventArgs e)

{

NATelephone.ReadOnly = false;

NAEmail.Text = "";

}

Thanks,

Carlos.
Nov 19 '05 #1
2 963
What are you doing in Page_Load? Where are you initialising ReadOnly to
true?

MattC
"Carlos" <ch******@yahoo.com> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...
Hi all,

I just came across the following situation. I have three radio buttons
within the same group name, next to each of them I do have a
textbox (total 3 radiobuttons, 3 textboxes). I start with one
Textbox with its ReadOnly property to be true next to the defaulted
radiobutton that is checked. Then, I define that my event handler
for the CheckedChange event should define the ReadOnly property false
next to the radiobutton that I just checked. That is switching from True
to
False. The change does not take place. After re-compiling the whole
solution
and refreshing the page, the status of the Textbos remains the same after
I change the status of the RadioButton. Here it is what I have.
Is there anything wrong?

private void InitializeComponent()

{

this.rbNAcontactYT.CheckedChanged += new
System.EventHandler(this.rbNAcontactYT_CheckedChan ged);

.

.

}

private void rbNAcontactYT_CheckedChanged(object sender, System.EventArgs
e)

{

NATelephone.ReadOnly = false;

NAEmail.Text = "";

}

Thanks,

Carlos.

Nov 19 '05 #2

ReadOnly is defaulted to true for the rb when I design the page..

"MattC" <m@m.com> wrote in message
news:Oz**************@TK2MSFTNGP14.phx.gbl...
What are you doing in Page_Load? Where are you initialising ReadOnly to
true?

MattC
"Carlos" <ch******@yahoo.com> wrote in message
news:Op**************@TK2MSFTNGP14.phx.gbl...
Hi all,

I just came across the following situation. I have three radio buttons
within the same group name, next to each of them I do have a
textbox (total 3 radiobuttons, 3 textboxes). I start with one
Textbox with its ReadOnly property to be true next to the defaulted
radiobutton that is checked. Then, I define that my event handler
for the CheckedChange event should define the ReadOnly property false
next to the radiobutton that I just checked. That is switching from True
to
False. The change does not take place. After re-compiling the whole
solution
and refreshing the page, the status of the Textbos remains the same after I change the status of the RadioButton. Here it is what I have.
Is there anything wrong?

private void InitializeComponent()

{

this.rbNAcontactYT.CheckedChanged += new
System.EventHandler(this.rbNAcontactYT_CheckedChan ged);

.

.

}

private void rbNAcontactYT_CheckedChanged(object sender, System.EventArgs e)

{

NATelephone.ReadOnly = false;

NAEmail.Text = "";

}

Thanks,

Carlos.


Nov 19 '05 #3

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

Similar topics

7
by: JDS | last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to JavaScript: I have a long, dynamically-generated form questionnaire. Not all of the form fields are dynamically...
6
by: TheKeith | last post by:
I am doing a form for my site and would like to enable and disable a radio button set depending on whether one of the choices on an outer radio button set is checked. How can I refer to all the...
3
by: ewitkop90 | last post by:
Here is my code: <SCRIPT> function transportchange(transport) { if (framenewinstall.Helpdesk.checked) framenewinstall.Helpdesk.checked=false; if (framenewinstall.CircuitNumber.checked)...
1
by: MickG | last post by:
I am trying to change the value of the variable "hard" according to which radio button is pressed and I am having no joy. Could anyone help me with this, the problematic section is marked with...
3
by: Alpha | last post by:
I have 3 radio buttons for include, exclued or 'select all' from the listbox items. If a user selects the 'Select All' button' then all items in listbox is hi-lited as selected. Now, when user...
5
by: Dan | last post by:
Hi, I'm going crazy here, please help. I have a parent page that has a user control on it that bubbles up data from a dropdown menu. The drop down menus are populated by a set of radio buttons,...
8
by: helpful sql | last post by:
Hi, I have 2 radio buttons on my Windows form control. The radio button's CheckedChanged event disables or enables other controls on the form based on the value of the Checked property. When the...
11
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked....
2
by: KDawg44 | last post by:
Hi, I am writing a PHP website. When I am taking some input from a user, I write some static radio buttons for a category, and then also write some more that are generated based on a query to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.