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

RadioButton does not fire event in ASP.NET

HI all,

I have two radioButtons on my form. They both have autopostback = true
and they are both in the same group. They both have event handlers for
CheckedChanged event. My problem is ont of them fires ok the other one
doesn't at all here is the code for them:

I have tried to delete them drag them from the toolbox again and
restart VS.NET none helped.

VB.NET code:

Private Sub optSettle_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optSettle.CheckedChanged
'# lock and clear other amount
txtOtherAmount.Text = ""
txtOtherAmount.Enabled = False
End Sub

Private Sub optOther2_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optOther2.CheckedChanged
'# unlock other amount
txtOtherAmount.Enabled = True
'# set focus to txtOtherAmount

End Sub
ASP.NET code:

<asp:RadioButton class="GeneralSmall" id="optSettle" runat="server"
Text="Full amount" GroupName="ba"
AutoPostBack="True"></asp:RadioButton>
<asp:RadioButton class="GeneralSmall" id="optOther2" runat="server"
Text="Other amount" GroupName="ba"></asp:RadioButton>

THANKS for any help

Nov 19 '05 #1
2 1485
Have you set AutoPostBack = true for the second one?
Patrick

"Brano" <bp****@gmail.com> wrote in message
news:11********************@g43g2000cwa.googlegrou ps.com...
HI all,

I have two radioButtons on my form. They both have autopostback = true
and they are both in the same group. They both have event handlers for
CheckedChanged event. My problem is ont of them fires ok the other one
doesn't at all here is the code for them:

I have tried to delete them drag them from the toolbox again and
restart VS.NET none helped.

VB.NET code:

Private Sub optSettle_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optSettle.CheckedChanged
'# lock and clear other amount
txtOtherAmount.Text = ""
txtOtherAmount.Enabled = False
End Sub

Private Sub optOther2_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optOther2.CheckedChanged
'# unlock other amount
txtOtherAmount.Enabled = True
'# set focus to txtOtherAmount

End Sub
ASP.NET code:

<asp:RadioButton class="GeneralSmall" id="optSettle" runat="server"
Text="Full amount" GroupName="ba"
AutoPostBack="True"></asp:RadioButton>
<asp:RadioButton class="GeneralSmall" id="optOther2" runat="server"
Text="Other amount" GroupName="ba"></asp:RadioButton>

THANKS for any help

Nov 19 '05 #2
Thanks that was it I was looking for it so long that i couldnt see
it... THANKS again

Nov 19 '05 #3

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

Similar topics

0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
2
by: Jerry | last post by:
Hi, I just found out that when I check a raidobutton TWO things happen. The CheckChange event is fired for unchecking the checked button and another is fired for the new one to become checked....
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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.