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

Radio buttons

I have 2 radio buttons in a form:

<asp:RadioButton ID="radio1" Runat="server" GroupName="RadioGroup1"
Text="Short Form" Checked="True" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
<asp:RadioButton ID="radio2" Runat="server" GroupName="RadioGroup1"
Text="Long Form" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
public void getSelected(object sender,System.Eventags e)
{
// blah blah....
}

There are still a lot of texboxes and validation check in the form

I have another textbox which needs to appear only when I select "Short
Form". I did not know why it did not trigger getSelected at all. I paid
attention to the left corner of the browser it said "Error on Page". I don't
know how to bug this

Thanks for figure out my problem.

Nov 18 '05 #1
2 1319
Hi,

Could it be that it is selected by default and if you click it again when it
is already selected, it's not actual change in the control's state and event
isn't raised therefore. But might be that I didn't undertand completely the
problem you described. In that case, can you clarify?
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:er**************@TK2MSFTNGP11.phx.gbl...
I have 2 radio buttons in a form:

<asp:RadioButton ID="radio1" Runat="server" GroupName="RadioGroup1"
Text="Short Form" Checked="True" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
<asp:RadioButton ID="radio2" Runat="server" GroupName="RadioGroup1"
Text="Long Form" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
public void getSelected(object sender,System.Eventags e)
{
// blah blah....
}

There are still a lot of texboxes and validation check in the form

I have another textbox which needs to appear only when I select "Short
Form". I did not know why it did not trigger getSelected at all. I paid
attention to the left corner of the browser it said "Error on Page". I
don't
know how to bug this

Thanks for figure out my problem.

Nov 18 '05 #2
Hi,

Could it be that it is selected by default and if you click it again when it
is already selected, it's not actual change in the control's state and event
isn't raised therefore. But might be that I didn't undertand completely the
problem you described. In that case, can you clarify?
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:er**************@TK2MSFTNGP11.phx.gbl...
I have 2 radio buttons in a form:

<asp:RadioButton ID="radio1" Runat="server" GroupName="RadioGroup1"
Text="Short Form" Checked="True" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
<asp:RadioButton ID="radio2" Runat="server" GroupName="RadioGroup1"
Text="Long Form" AutoPostBack="True"
OnCheckedChanged="getSelected"></asp:RadioButton>
public void getSelected(object sender,System.Eventags e)
{
// blah blah....
}

There are still a lot of texboxes and validation check in the form

I have another textbox which needs to appear only when I select "Short
Form". I did not know why it did not trigger getSelected at all. I paid
attention to the left corner of the browser it said "Error on Page". I
don't
know how to bug this

Thanks for figure out my problem.

Nov 18 '05 #3

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

Similar topics

1
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
6
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked ...
2
by: Rob | last post by:
Hi all, I've got multiple sets of radio button that are dynamically created in code and populated by a database query. The query returns about 20 recordsets with 3 radio buttons per recordset and...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
1
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and...
2
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
4
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.