473,398 Members | 2,368 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,398 software developers and data experts.

RadioButtonList and SelectedItem when control is disabled

I have a RadioButtonList that can be disabled on the form via a higher up
checkbox. Even if the checkbox disables the radio buttons, I do want to
save to a DB the currently selected radio button...so I can restore the
user's last choice.

Seems like if the RadioButtonList is disabled (via client Javascript), then
the code-behind always returns -1 for the SelectedIndex property.

Is there a way to figure out what is selected (e.g. checked) even if it is
disabled?

Amil
Nov 19 '05 #1
1 1645
I ended up adding a hidden field and setting it to the index of the radio
button via client js. I used "runat=server" so I could declare it via C#
and read it in code-behind. Works, but seems like I should have been able
to get it via the radiobuttonlist :-(

Amil

"Amil" <Am********@hotmail.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
I have a RadioButtonList that can be disabled on the form via a higher up
checkbox. Even if the checkbox disables the radio buttons, I do want to
save to a DB the currently selected radio button...so I can restore the
user's last choice.

Seems like if the RadioButtonList is disabled (via client Javascript), then the code-behind always returns -1 for the SelectedIndex property.

Is there a way to figure out what is selected (e.g. checked) even if it is
disabled?

Amil

Nov 19 '05 #2

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

Similar topics

3
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load i create dynamically a table which contains a checkbox and a radiobuttonlist in each tablerow . The radiobuttonlist...
1
by: Darren | last post by:
Dear Groups, I have searched EVERYWHERE on the net and msdn for a solution to my problem and am coming up with nothing. I simply need to capture the 'selected row' and the...
2
by: Alphonse Giambrone | last post by:
Hi all, I have two radiobuttonlist controls on a page. When a user checks 'No' for rblDeleted, I want to automatically set rblSendCard to 'No' and disable it. The javascript function I wrote to...
1
by: novice_developer | last post by:
Hi All, there is a radiobuttonlist having 2 list items (state & zipcode). when i select state radiobutton the zipcode textbox should be disabled and when i select a zipcode radiobutton the state...
4
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load (page_load) i create dynamically an html table which contains a checkbox and a radiobuttonlist in each tablerow . The...
0
by: djarmoluk | last post by:
I have a RadioButtonList (named rbAnswers) control within a repeater control. When binding to the repeater, I am trying to add an "OnChange" attribute to the individual list item controls (input...
5
by: Øyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
2
by: Vahagn | last post by:
Hi, how do I retrieve the chosen value from a RadioButtonList? I have a RadioButtonList that is populated dynamically with a "Next" button. Ie, I have a list of questions each with 2-3 answer...
1
by: =?Utf-8?B?VGhlRHJpZnRlcg==?= | last post by:
This seems to be one of the great mysteries of ASP.NET as I have seen numerous postings on this with absolutely no answers. SetFocus does not work on the RadioButtonList control. Does anybody...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.